From nobody Wed Nov 12 05:24:26 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; spf=pass (zoho.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=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1568301433; cv=none; d=zoho.com; s=zohoarc; b=fkswgEg76Strur/93rsLJuZsd25Shys5kb06YZCsEIPUAOwDx8gTFmHHo0fMKuXO2aCyOHeKOar4CjnR4mLD5gOgAMvOwpCxlJ00eQHumC0SZyqF+YuPrEqKHYGyHc7k/q70afpYTCC1UjJ8Ywdysc3vh439xGHgznmhUG1zbL0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568301433; h=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:ARC-Authentication-Results; bh=uerRlFstMtgtQX9ySVCl1YirblvzjJ5b4wXTm4je9Fc=; b=ZmdLjEVKmyplk8GcyMGZApXrZHfT9PsoqrdcfGpS72RKHVCl2UDbhljhagSI8nZEbfCOawsfbRIvm1G2xuCBcG3AVWKL6BjJVpHTPru9nAq27utPbWgDx4OdMbLuWaBo4ROYEcsWShWKiua2kP5QkoDFfuftQougJ133N5yO1uU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.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 1568301433477918.5062434346231; Thu, 12 Sep 2019 08:17:13 -0700 (PDT) Received: from localhost ([::1]:35758 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8QqN-00043T-Hj for importer@patchew.org; Thu, 12 Sep 2019 11:17:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38366) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i8Qn5-00024z-8R for qemu-devel@nongnu.org; Thu, 12 Sep 2019 11:13:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i8Qn3-00036E-86 for qemu-devel@nongnu.org; Thu, 12 Sep 2019 11:13:47 -0400 Received: from relay.sw.ru ([185.231.240.75]:57850) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i8Qmz-00034C-SW; Thu, 12 Sep 2019 11:13:42 -0400 Received: from [10.94.3.0] (helo=kvm.qa.sw.ru) by relay.sw.ru with esmtp (Exim 4.92) (envelope-from ) id 1i8Qmx-0000kk-4U; Thu, 12 Sep 2019 18:13:39 +0300 From: Vladimir Sementsov-Ogievskiy To: qemu-block@nongnu.org Date: Thu, 12 Sep 2019 18:13:38 +0300 Message-Id: <20190912151338.21225-5-vsementsov@virtuozzo.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190912151338.21225-1-vsementsov@virtuozzo.com> References: <20190912151338.21225-1-vsementsov@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 185.231.240.75 Subject: [Qemu-devel] [PATCH 4/4] Revert "mirror: Only mirror granularity-aligned chunks" 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: kwolf@redhat.com, vsementsov@virtuozzo.com, qemu-devel@nongnu.org, mreitz@redhat.com, den@openvz.org, jsnow@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" This reverts commit 9adc1cb49af8d4e54f57980b1eed5c0a4b2dafa6. "mirror: Only mirror granularity-aligned chunks" Since previous commit unaligned chunks are supported by do_sync_target_write. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz --- block/mirror.c | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index d192f6a96b..4626b91541 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -1482,15 +1482,6 @@ static void bdrv_mirror_top_child_perm(BlockDriverSt= ate *bs, BdrvChild *c, *nshared =3D BLK_PERM_ALL; } =20 -static void bdrv_mirror_top_refresh_limits(BlockDriverState *bs, Error **e= rrp) -{ - MirrorBDSOpaque *s =3D bs->opaque; - - if (s && s->job && s->job->copy_mode =3D=3D MIRROR_COPY_MODE_WRITE_BLO= CKING) { - bs->bl.request_alignment =3D s->job->granularity; - } -} - /* Dummy node that provides consistent read to its users without requiring= it * from its backing file and that allows writes on the backing file chain.= */ static BlockDriver bdrv_mirror_top =3D { @@ -1503,7 +1494,6 @@ static BlockDriver bdrv_mirror_top =3D { .bdrv_co_block_status =3D bdrv_co_block_status_from_backing, .bdrv_refresh_filename =3D bdrv_mirror_top_refresh_filename, .bdrv_child_perm =3D bdrv_mirror_top_child_perm, - .bdrv_refresh_limits =3D bdrv_mirror_top_refresh_limits, }; =20 static BlockJob *mirror_start_job( @@ -1651,25 +1641,6 @@ static BlockJob *mirror_start_job( s->should_complete =3D true; } =20 - /* - * Must be called before we start tracking writes, but after - * - * ((MirrorBlockJob *) - * ((MirrorBDSOpaque *) - * mirror_top_bs->opaque - * )->job - * )->copy_mode - * - * has the correct value. - * (We start tracking writes as of the following - * bdrv_create_dirty_bitmap() call.) - */ - bdrv_refresh_limits(mirror_top_bs, &local_err); - if (local_err) { - error_propagate(errp, local_err); - goto fail; - } - s->dirty_bitmap =3D bdrv_create_dirty_bitmap(bs, granularity, NULL, er= rp); if (!s->dirty_bitmap) { goto fail; --=20 2.21.0