From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37708) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0ocq-0003oP-At for qemu-devel@nongnu.org; Tue, 16 Dec 2014 04:41:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y0ocm-0000hP-7X for qemu-devel@nongnu.org; Tue, 16 Dec 2014 04:41:04 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54688) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0ocl-0000hL-UY for qemu-devel@nongnu.org; Tue, 16 Dec 2014 04:41:00 -0500 Message-ID: <548FFE27.1080806@redhat.com> Date: Tue, 16 Dec 2014 10:40:55 +0100 From: Max Reitz MIME-Version: 1.0 References: <1417081246-3593-1-git-send-email-vsementsov@parallels.com> In-Reply-To: <1417081246-3593-1-git-send-email-vsementsov@parallels.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] block: fix spoiling all dirty bitmaps by mirror and migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladimir Sementsov-Ogievskiy , qemu-devel@nongnu.org Cc: Kevin Wolf , "Denis V. Lunev" , John Snow , Fam Zheng , Stefan Hajnoczi On 2014-11-27 at 10:40, Vladimir Sementsov-Ogievskiy wrote: > Mirror and migration use dirty bitmaps for their purposes, and since > commit [block: per caller dirty bitmap] they use their own bitmaps, not > the global one. But they use old functions bdrv_set_dirty and > bdrv_reset_dirty, which change all dirty bitmaps. > > Named dirty bitmaps series by Fam and Snow are affected: mirroring and > migration will spoil all (not related to this mirroring or migration) > named dirty bitmaps. > > This patch fixes this by adding bdrv_set_dirty_bitmap and > bdrv_reset_dirty_bitmap, which change concrete bitmap. Also, to prevent > such mistakes in future, old functions bdrv_(set,reset)_dirty are made > static, for internal block usage. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > CC: John Snow > CC: Fam Zheng > CC: Denis V. Lunev > CC: Stefan Hajnoczi > CC: Kevin Wolf > --- > > This patch conflicts with > [PATCH v8 05/10] block: Add bdrv_copy_dirty_bitmap and bdrv_reset_dirty_bitmap > by John Snow, which introduces bdrv_reset_dirty_bitmap too, but it resets the whole > bitmap, not specified sectors range. > > block-migration.c | 5 +++-- > block.c | 23 ++++++++++++++++++++--- > block/mirror.c | 11 +++++++---- > include/block/block.h | 6 ++++-- > 4 files changed, 34 insertions(+), 11 deletions(-) Thanks, applied to my block tree: https://github.com/XanClic/qemu/commits/block