From nobody Mon Apr 29 06:51:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1491498941482488.41421336765427; Thu, 6 Apr 2017 10:15:41 -0700 (PDT) Received: from localhost ([::1]:47029 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cwB0W-0004yt-0W for importer@patchew.org; Thu, 06 Apr 2017 13:15:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47904) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cwAzP-0004G3-P1 for qemu-devel@nongnu.org; Thu, 06 Apr 2017 13:14:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cwAzP-00009N-2A for qemu-devel@nongnu.org; Thu, 06 Apr 2017 13:14:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46986) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cwAzM-00007d-M0; Thu, 06 Apr 2017 13:14:28 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A0DCEC04B946; Thu, 6 Apr 2017 17:14:27 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-62.ams2.redhat.com [10.36.117.62]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2F6E27BB6C; Thu, 6 Apr 2017 17:14:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A0DCEC04B946 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A0DCEC04B946 From: Kevin Wolf To: qemu-block@nongnu.org Date: Thu, 6 Apr 2017 19:14:10 +0200 Message-Id: <1491498851-16709-2-git-send-email-kwolf@redhat.com> In-Reply-To: <1491498851-16709-1-git-send-email-kwolf@redhat.com> References: <1491498851-16709-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 06 Apr 2017 17:14:27 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH for-2.9 1/2] commit: Set commit_top_bs->aio_context X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The filter driver that is inserted by the commit job needs to use the same AioContext as its parent and child nodes. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Fam Zheng --- block/commit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/commit.c b/block/commit.c index 2832482..4c38220 100644 --- a/block/commit.c +++ b/block/commit.c @@ -335,6 +335,7 @@ void commit_start(const char *job_id, BlockDriverState = *bs, if (commit_top_bs =3D=3D NULL) { goto fail; } + bdrv_set_aio_context(commit_top_bs, bdrv_get_aio_context(top)); =20 bdrv_set_backing_hd(commit_top_bs, top, &local_err); if (local_err) { @@ -482,6 +483,7 @@ int bdrv_commit(BlockDriverState *bs) error_report_err(local_err); goto ro_cleanup; } + bdrv_set_aio_context(commit_top_bs, bdrv_get_aio_context(backing_file_= bs)); =20 bdrv_set_backing_hd(commit_top_bs, backing_file_bs, &error_abort); bdrv_set_backing_hd(bs, commit_top_bs, &error_abort); --=20 1.8.3.1 From nobody Mon Apr 29 06:51:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1491498942355670.9234363439298; Thu, 6 Apr 2017 10:15:42 -0700 (PDT) Received: from localhost ([::1]:47030 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cwB0X-0004zR-4J for importer@patchew.org; Thu, 06 Apr 2017 13:15:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47932) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cwAzR-0004Hp-IV for qemu-devel@nongnu.org; Thu, 06 Apr 2017 13:14:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cwAzQ-0000Ap-OU for qemu-devel@nongnu.org; Thu, 06 Apr 2017 13:14:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47020) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cwAzO-00008W-Jh; Thu, 06 Apr 2017 13:14:30 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A16AAC04B94A; Thu, 6 Apr 2017 17:14:29 +0000 (UTC) Received: from noname.redhat.com (ovpn-117-62.ams2.redhat.com [10.36.117.62]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0435C7B12C; Thu, 6 Apr 2017 17:14:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A16AAC04B94A Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A16AAC04B94A From: Kevin Wolf To: qemu-block@nongnu.org Date: Thu, 6 Apr 2017 19:14:11 +0200 Message-Id: <1491498851-16709-3-git-send-email-kwolf@redhat.com> In-Reply-To: <1491498851-16709-1-git-send-email-kwolf@redhat.com> References: <1491498851-16709-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 06 Apr 2017 17:14:29 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH for-2.9 2/2] commit: Set commit_top_bs->total_sectors X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Like in the mirror filter driver, we also need to set the image size for the commit filter driver. This is less likely to be a problem in practice than for the mirror because we're not at the active layer here, but attaching new parents to a node in the middle of the chain is possible, so the size needs to be correct anyway. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: Fam Zheng --- block/commit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/commit.c b/block/commit.c index 4c38220..91d2c34 100644 --- a/block/commit.c +++ b/block/commit.c @@ -335,6 +335,7 @@ void commit_start(const char *job_id, BlockDriverState = *bs, if (commit_top_bs =3D=3D NULL) { goto fail; } + commit_top_bs->total_sectors =3D top->total_sectors; bdrv_set_aio_context(commit_top_bs, bdrv_get_aio_context(top)); =20 bdrv_set_backing_hd(commit_top_bs, top, &local_err); --=20 1.8.3.1