[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH RFC v2 5/8] block: add bdrv_dirty_bitmap_enabled

From: John Snow
Subject: Re: [Qemu-devel] [PATCH RFC v2 5/8] block: add bdrv_dirty_bitmap_enabled()
Date: Tue, 10 Feb 2015 16:30:58 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

On 01/27/2015 05:56 AM, Vladimir Sementsov-Ogievskiy wrote:
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
  block.c               | 5 +++++
  include/block/block.h | 1 +
  2 files changed, 6 insertions(+)

diff --git a/block.c b/block.c
index 8ab724b..15fc621 100644
--- a/block.c
+++ b/block.c
@@ -5551,6 +5551,11 @@ uint64_t bdrv_dirty_bitmap_granularity(BlockDriverState 
      return bitmap->granularity;

+bool bdrv_dirty_bitmap_enabled(BdrvDirtyBitmap *bitmap)
+    return bitmap->enabled;
  void bdrv_dirty_iter_init(BlockDriverState *bs,
                            BdrvDirtyBitmap *bitmap, HBitmapIter *hbi)
diff --git a/include/block/block.h b/include/block/block.h
index 648b0a9..7b49d98 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -449,6 +449,7 @@ BlockDirtyInfoList 
*bdrv_query_dirty_bitmaps(BlockDriverState *bs);
  uint64_t bdrv_get_default_bitmap_granularity(BlockDriverState *bs);
  uint64_t bdrv_dirty_bitmap_granularity(BlockDriverState *bs,
                                        BdrvDirtyBitmap *bitmap);
+bool bdrv_dirty_bitmap_enabled(BdrvDirtyBitmap *bitmap);
  int bdrv_get_dirty(BlockDriverState *bs, BdrvDirtyBitmap *bitmap, int64_t 
  void bdrv_set_dirty_bitmap(BlockDriverState *bs, BdrvDirtyBitmap *bitmap,
                             int64_t cur_sector, int nr_sectors);

I wrote something similar in my incremental backup series. I'm submitting a new incremental backup series (v12!) soon which might have /slightly/ different semantics for enabled/disabled bitmaps.

I don't think you'll need this patch, but in case you do need it:

Reviewed-by: John Snow <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]