From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43410) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aZaMC-0006KT-Hy for qemu-devel@nongnu.org; Sat, 27 Feb 2016 03:36:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aZaMB-00018k-LP for qemu-devel@nongnu.org; Sat, 27 Feb 2016 03:36:08 -0500 Date: Sat, 27 Feb 2016 16:35:57 +0800 From: Fam Zheng Message-ID: <20160227083557.GD12620@ad.usersys.redhat.com> References: <1453270306-16608-1-git-send-email-famz@redhat.com> <1453793174-18957-1-git-send-email-famz@redhat.com> <56A8DAE3.1050401@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56A8DAE3.1050401@virtuozzo.com> Subject: Re: [Qemu-devel] [PATCH v2 14/13] block: More operations for meta dirty bitmap List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladimir Sementsov-Ogievskiy Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org On Wed, 01/27 17:57, Vladimir Sementsov-Ogievskiy wrote: > On 26.01.2016 10:26, Fam Zheng wrote: > >Callers can create an iterator of meta bitmap with > >bdrv_dirty_meta_iter_new(), then use the bdrv_dirty_iter_* operations on > >it. Meta iterators are also counted by bitmap->active_iterators. > > > >Also add a couple of functions to retrieve granularity and count. > > > >Signed-off-by: Fam Zheng > > > >--- > > > >Vladimir, are these interfaces enough for your migration series? If it > >is more convenient to you, you can adjust and take it into your series. > > This patch is ok (the only thing - see comment below), thanks. The > only thing is that my migration series may be changed to use > post-copy migration instead of meta-bitmaps.. > > >--- > > block/dirty-bitmap.c | 19 +++++++++++++++++++ > > include/block/dirty-bitmap.h | 3 +++ > > 2 files changed, 22 insertions(+) > > > >diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c > >index bf84b17..1aa7f76 100644 > >--- a/block/dirty-bitmap.c > >+++ b/block/dirty-bitmap.c > >@@ -369,6 +369,11 @@ uint32_t bdrv_dirty_bitmap_granularity(BdrvDirtyBitmap *bitmap) > > return BDRV_SECTOR_SIZE << hbitmap_granularity(bitmap->bitmap); > > } > >+uint32_t bdrv_dirty_bitmap_meta_granularity(BdrvDirtyBitmap *bitmap) > >+{ > >+ return hbitmap_granularity(bitmap->meta); > >+} > > I think it should be more like bdrv_dirty_bitmap_granularity, with > "BDRV_SECTOR_SIZE << ". Yes, will change. Fam