From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgbYf-0005TO-Jr for qemu-devel@nongnu.org; Wed, 13 Nov 2013 09:36:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VgbYZ-0007MU-GK for qemu-devel@nongnu.org; Wed, 13 Nov 2013 09:36:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:29528) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VgbYZ-0007LK-9H for qemu-devel@nongnu.org; Wed, 13 Nov 2013 09:36:35 -0500 Date: Wed, 13 Nov 2013 15:36:31 +0100 From: Kevin Wolf Message-ID: <20131113143631.GG2633@dhcp-200-207.str.redhat.com> References: <1384338584-14065-1-git-send-email-famz@redhat.com> <1384338584-14065-2-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v3 1/2] block: per caller dirty bitmap List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: =?iso-8859-1?Q?Beno=EEt?= Canet , pbonzini@redhat.com, Fam Zheng , "qemu-devel@nongnu.org" , Stefan Hajnoczi Am 13.11.2013 um 15:33 hat Fam Zheng geschrieben: > On Wed, Nov 13, 2013 at 6:29 PM, Fam Zheng wrote: > > Previously a BlockDriverState has only one dirty bitmap, so only one > > caller (e.g. a block job) can keep track of writing. This changes the > > dirty bitmap to a list and creates a BdrvDirtyBitmap for each caller, the > > lifecycle is managed with these new functions: > > > > bdrv_create_dirty_bitmap > > bdrv_release_dirty_bitmap > > > > Where BdrvDirtyBitmap is a linked list wrapper structure of HBitmap. > > > > In place of bdrv_set_dirty_tracking, a BdrvDirtyBitmap pointer argument > > is added to these functions, since each caller has its own dirty bitmap: > > > > bdrv_get_dirty > > bdrv_dirty_iter_init > > bdrv_get_dirty_count > > > > bdrv_set_dirty and bdrv_reset_dirty prototypes are unchanged but will > > internally walk the list of all dirty bitmaps and set them one by one. > > > > Signed-off-by: Fam Zheng > > > > --- > > v2: Added BdrvDirtyBitmap [Paolo] > > > > Signed-off-by: Fam Zheng > > @@ -2785,9 +2792,7 @@ static int coroutine_fn bdrv_co_do_writev(BlockDriverState *bs, > > ret = bdrv_co_flush(bs); > > } > > > > - if (bs->dirty_bitmap) { > > bdrv_set_dirty(bs, sector_num, nb_sectors); > > - } > > Sorry, forgot to fix this indentation. Kevin, could you fix it when > applying? Thanks. Yes, I already did that (and added Stefan's Reviewed-by, as this patch is unchanged compared to v2). Kevin