From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9KVR-000841-Di for qemu-devel@nongnu.org; Thu, 08 Jan 2015 16:20:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y9KVM-0002WB-8o for qemu-devel@nongnu.org; Thu, 08 Jan 2015 16:20:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39847) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9KVM-0002Vu-1u for qemu-devel@nongnu.org; Thu, 08 Jan 2015 16:20:32 -0500 Message-ID: <54AEF49E.5000002@redhat.com> Date: Thu, 08 Jan 2015 16:20:30 -0500 From: John Snow MIME-Version: 1.0 References: <1418307457-25996-1-git-send-email-vsementsov@parallels.com> <1418307457-25996-4-git-send-email-vsementsov@parallels.com> In-Reply-To: <1418307457-25996-4-git-send-email-vsementsov@parallels.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/9] 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: kwolf@redhat.com, den@openvz.org, stefanha@redhat.com On 12/11/2014 09:17 AM, 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 > --- > block-migration.c | 5 +++-- > block.c | 23 ++++++++++++++++++++--- > block/mirror.c | 11 +++++++---- > include/block/block.h | 6 ++++-- > 4 files changed, 34 insertions(+), 11 deletions(-) > [snip] A version of this already went in upstream, so it can be dropped here now.