[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH v20 18/30] block/dirty-bitmap: add bdrv_dirty_bitmap
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[Qemu-block] [PATCH v20 18/30] block/dirty-bitmap: add bdrv_dirty_bitmap_next() |
Date: |
Fri, 2 Jun 2017 14:21:46 +0300 |
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Reviewed-by: John Snow <address@hidden>
---
block/dirty-bitmap.c | 7 +++++++
include/block/dirty-bitmap.h | 3 +++
2 files changed, 10 insertions(+)
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
index d14adff88d..ca60602b48 100644
--- a/block/dirty-bitmap.c
+++ b/block/dirty-bitmap.c
@@ -614,3 +614,10 @@ bool bdrv_has_changed_persistent_bitmaps(BlockDriverState
*bs)
return false;
}
+
+BdrvDirtyBitmap *bdrv_dirty_bitmap_next(BlockDriverState *bs,
+ BdrvDirtyBitmap *bitmap)
+{
+ return bitmap == NULL ? QLIST_FIRST(&bs->dirty_bitmaps) :
+ QLIST_NEXT(bitmap, list);
+}
diff --git a/include/block/dirty-bitmap.h b/include/block/dirty-bitmap.h
index 721f025850..a3ac9c3640 100644
--- a/include/block/dirty-bitmap.h
+++ b/include/block/dirty-bitmap.h
@@ -87,4 +87,7 @@ void bdrv_dirty_bitmap_set_persistance(BdrvDirtyBitmap
*bitmap,
bool bdrv_dirty_bitmap_get_persistance(BdrvDirtyBitmap *bitmap);
bool bdrv_has_changed_persistent_bitmaps(BlockDriverState *bs);
+BdrvDirtyBitmap *bdrv_dirty_bitmap_next(BlockDriverState *bs,
+ BdrvDirtyBitmap *bitmap);
+
#endif
--
2.11.1
- [Qemu-block] [PATCH v20 01/30] specs/qcow2: fix bitmap granularity qemu-specific note, (continued)
- [Qemu-block] [PATCH v20 01/30] specs/qcow2: fix bitmap granularity qemu-specific note, Vladimir Sementsov-Ogievskiy, 2017/06/02
- [Qemu-block] [PATCH v20 24/30] qmp: add autoload parameter to block-dirty-bitmap-add, Vladimir Sementsov-Ogievskiy, 2017/06/02
- [Qemu-block] [PATCH v20 19/30] qcow2: add persistent dirty bitmaps support, Vladimir Sementsov-Ogievskiy, 2017/06/02
- [Qemu-block] [PATCH v20 11/30] qcow2: autoloading dirty bitmaps, Vladimir Sementsov-Ogievskiy, 2017/06/02
- [Qemu-block] [PATCH v20 06/30] block/dirty-bitmap: add deserialize_ones func, Vladimir Sementsov-Ogievskiy, 2017/06/02
- [Qemu-block] [PATCH v20 05/30] block: fix bdrv_dirty_bitmap_granularity signature, Vladimir Sementsov-Ogievskiy, 2017/06/02
- [Qemu-block] [PATCH v20 12/30] block: refactor bdrv_reopen_commit, Vladimir Sementsov-Ogievskiy, 2017/06/02
- [Qemu-block] [PATCH v20 16/30] block: bdrv_close: release bitmaps after drv->bdrv_close, Vladimir Sementsov-Ogievskiy, 2017/06/02
- [Qemu-block] [PATCH v20 18/30] block/dirty-bitmap: add bdrv_dirty_bitmap_next(),
Vladimir Sementsov-Ogievskiy <=
- [Qemu-block] [PATCH v20 28/30] qcow2: add .bdrv_remove_persistent_dirty_bitmap, Vladimir Sementsov-Ogievskiy, 2017/06/02
- [Qemu-block] [PATCH v20 29/30] qmp: block-dirty-bitmap-remove: remove persistent, Vladimir Sementsov-Ogievskiy, 2017/06/02
- [Qemu-block] [PATCH v20 07/30] qcow2-refcount: rename inc_refcounts() and make it public, Vladimir Sementsov-Ogievskiy, 2017/06/02
- [Qemu-block] [PATCH v20 21/30] block: add bdrv_can_store_new_dirty_bitmap, Vladimir Sementsov-Ogievskiy, 2017/06/02
- [Qemu-block] [PATCH v20 27/30] block/dirty-bitmap: add bdrv_remove_persistent_dirty_bitmap, Vladimir Sementsov-Ogievskiy, 2017/06/02
- [Qemu-block] [PATCH v20 22/30] qcow2: add .bdrv_can_store_new_dirty_bitmap, Vladimir Sementsov-Ogievskiy, 2017/06/02
- [Qemu-block] [PATCH v20 02/30] specs/qcow2: do not use wording 'bitmap header', Vladimir Sementsov-Ogievskiy, 2017/06/02
- [Qemu-block] [PATCH v20 10/30] block/dirty-bitmap: add readonly field to BdrvDirtyBitmap, Vladimir Sementsov-Ogievskiy, 2017/06/02