From nobody Mon Feb 9 09:28:38 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1617970340; cv=none; d=zohomail.com; s=zohoarc; b=gK9J8jwwxRZ69RDCLHGCbwPlu7o/BYt3O0REXBEpIIglnRzQtcB/9pfkzIK6rIlg0NLv8GaxR2JiGXjDquG/dl6QTzuk3FXT/cDpcljvf1sEmB1hzjkMIilmsWDMB32+fW3/dHdQa+YFpgz6H5jjlBYWq6E6ByXT5qI7hfkDUq8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1617970340; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LAc7L9+YJ0ealn7uzjhYK9sm6EPpUm39QMeBeWZZmLI=; b=hYeI7aT3iB0MSbe83G4+tmacfFERpTJ52B5GjFo+MTdeLbFBXf07SqVzKg1c0V2JTKyYs4PJub5EvW1Gv57YzD3ByqYof3E6JBXAbeN023mr9H+ZAvFdBg4spoHF/jXtdLPXacH5eM5Jg6O6NV55FXeIXq5TsX5fIMrph1UbTJ8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 161797034018788.95430545166971; Fri, 9 Apr 2021 05:12:20 -0700 (PDT) Received: from localhost ([::1]:43634 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lUpzn-0004oD-7s for importer@patchew.org; Fri, 09 Apr 2021 08:12:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43614) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUpsO-000810-F9 for qemu-devel@nongnu.org; Fri, 09 Apr 2021 08:04:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:25630) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUpsH-0008DO-1O for qemu-devel@nongnu.org; Fri, 09 Apr 2021 08:04:39 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-491-bZ4uwY5kMTK5NbaSkUPcvg-1; Fri, 09 Apr 2021 08:04:30 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E4B368030B5; Fri, 9 Apr 2021 12:04:28 +0000 (UTC) Received: from localhost (ovpn-114-67.ams2.redhat.com [10.36.114.67]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 874992DAD0; Fri, 9 Apr 2021 12:04:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617969872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LAc7L9+YJ0ealn7uzjhYK9sm6EPpUm39QMeBeWZZmLI=; b=UzoXO0rigOM9/X852USiEEfyBD2jIzOxviLnQ+eJoaWpQZ0Vo1iAw57uGie8U8pS7MZ3ew OGbpY4yrR55imoaRKSVcuayep1oeependyW0wOGFldej9ymCRdZdn49rwqpVCBx63w2SHR FsyQoCyjdt+FzoV3zZ+95VpZ4d/w+EE= X-MC-Unique: bZ4uwY5kMTK5NbaSkUPcvg-1 From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH 2/4] mirror: Do not enter a paused job on completion Date: Fri, 9 Apr 2021 14:04:19 +0200 Message-Id: <20210409120422.144040-3-mreitz@redhat.com> In-Reply-To: <20210409120422.144040-1-mreitz@redhat.com> References: <20210409120422.144040-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mreitz@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=216.205.24.124; envelope-from=mreitz@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Vladimir Sementsov-Ogievskiy , John Snow , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Currently, it is impossible to complete jobs on standby (i.e. paused ready jobs), but actually the only thing in mirror_complete() that does not work quite well with a paused job is the job_enter() at the end. If we make it conditional, this function works just fine even if the mirror job is paused. So technically this is a no-op, but obviously the intention is to accept block-job-complete even for jobs on standby, which we need this patch for first. Signed-off-by: Max Reitz --- block/mirror.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/block/mirror.c b/block/mirror.c index f1f936bf1a..5a71bd8bbc 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -1148,7 +1148,11 @@ static void mirror_complete(Job *job, Error **errp) } =20 s->should_complete =3D true; - job_enter(job); + + /* If the job is paused, it will be re-entered when it is resumed */ + if (!job->paused) { + job_enter(job); + } } =20 static void coroutine_fn mirror_pause(Job *job) --=20 2.29.2