From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9KUn-00072l-68 for qemu-devel@nongnu.org; Thu, 08 Jan 2015 16:19:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y9KUj-00027t-63 for qemu-devel@nongnu.org; Thu, 08 Jan 2015 16:19:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60235) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9KUi-00027k-UB for qemu-devel@nongnu.org; Thu, 08 Jan 2015 16:19:53 -0500 Message-ID: <54AEF476.1030701@redhat.com> Date: Thu, 08 Jan 2015 16:19:50 -0500 From: John Snow MIME-Version: 1.0 References: <1418307457-25996-1-git-send-email-vsementsov@parallels.com> <1418307457-25996-2-git-send-email-vsementsov@parallels.com> In-Reply-To: <1418307457-25996-2-git-send-email-vsementsov@parallels.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/9] block: rename bdrv_reset_dirty_bitmap 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: > We will need functions for set/unset a subregion of BdrvDirtyBitmap, to > fix migration and mirror (accordingly to the following patch "block: fix > spoiling all dirty bitmaps by mirror and migration"). Having the > old function 'bdrv_reset_dirty_bitmap' we'll have to add functions like > > bdrv_set_dirty_bitmap_region and bdrv_reset_dirty_bitmap_region > > But it is more consistent to have > > bdrv_set_dirty_bitmap(BlockDriverState *bs, BdrvDirtyBitmap *bitmap, > uint64_t start, uint64_t count) > bdrv_reset_dirty_bitmap(BlockDriverState *bs, BdrvDirtyBitmap *bitmap, > uint64_t start, uint64_t count) > > for more transparent access to underlaying hbitmap interface. So, here > we rename the considered function to 'bdrv_clear_dirty_bitmap'. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block.c | 2 +- > block/backup.c | 2 +- > include/block/block.h | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/block.c b/block.c > index 677bc6f..a37dc2f 100644 > --- a/block.c > +++ b/block.c > @@ -5364,7 +5364,7 @@ BdrvDirtyBitmap *bdrv_copy_dirty_bitmap(BlockDriverState *bs, > return new_bitmap; > } > > -void bdrv_reset_dirty_bitmap(BlockDriverState *bs, BdrvDirtyBitmap *bitmap) > +void bdrv_clear_dirty_bitmap(BlockDriverState *bs, BdrvDirtyBitmap *bitmap) > { > hbitmap_reset(bitmap->bitmap, 0, bitmap->size); > } > diff --git a/block/backup.c b/block/backup.c > index 2aab68f..da87581 100644 > --- a/block/backup.c > +++ b/block/backup.c > @@ -449,7 +449,7 @@ void backup_start(BlockDriverState *bs, BlockDriverState *target, > case BITMAP_USE_MODE_RESET: > original = sync_bitmap; > sync_bitmap = bdrv_copy_dirty_bitmap(bs, sync_bitmap, NULL); > - bdrv_reset_dirty_bitmap(bs, original); > + bdrv_clear_dirty_bitmap(bs, original); > break; > case BITMAP_USE_MODE_CONSUME: > bdrv_dirty_bitmap_make_anon(bs, sync_bitmap); > diff --git a/include/block/block.h b/include/block/block.h > index e535581..368a371 100644 > --- a/include/block/block.h > +++ b/include/block/block.h > @@ -437,7 +437,7 @@ BdrvDirtyBitmap *bdrv_create_dirty_bitmap(BlockDriverState *bs, > BdrvDirtyBitmap *bdrv_find_dirty_bitmap(BlockDriverState *bs, > const char *name); > void bdrv_dirty_bitmap_make_anon(BlockDriverState *bs, BdrvDirtyBitmap *bitmap); > -void bdrv_reset_dirty_bitmap(BlockDriverState *bs, > +void bdrv_clear_dirty_bitmap(BlockDriverState *bs, > BdrvDirtyBitmap *bitmap); > BdrvDirtyBitmap *bdrv_copy_dirty_bitmap(BlockDriverState *bs, > const BdrvDirtyBitmap *bitmap, > Looks like the same change I made in V10 of my series, so we can drop this.