[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 12/21] block/dirty-bitmap: add bdrv_dirty_bitmap_nex
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[Qemu-devel] [PATCH 12/21] block/dirty-bitmap: add bdrv_dirty_bitmap_next() |
Date: |
Tue, 22 Nov 2016 20:26:17 +0300 |
Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
Reviewed-by: Max Reitz <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 4d026df..fe34d48 100644
--- a/block/dirty-bitmap.c
+++ b/block/dirty-bitmap.c
@@ -582,3 +582,10 @@ bool bdrv_has_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 8dbd16b..d71edc4 100644
--- a/include/block/dirty-bitmap.h
+++ b/include/block/dirty-bitmap.h
@@ -81,6 +81,9 @@ void bdrv_dirty_bitmap_set_persistance(BdrvDirtyBitmap
*bitmap,
bool persistent);
bool bdrv_dirty_bitmap_get_persistance(BdrvDirtyBitmap *bitmap);
+BdrvDirtyBitmap *bdrv_dirty_bitmap_next(BlockDriverState *bs,
+ BdrvDirtyBitmap *bitmap);
+
bool bdrv_has_persistent_bitmaps(BlockDriverState *bs);
#endif
--
1.8.3.1
- [Qemu-devel] [PATCH v9 00/21] qcow2: persistent dirty bitmaps, Vladimir Sementsov-Ogievskiy, 2016/11/22
- [Qemu-devel] [PATCH 04/21] tests: add hbitmap iter test, Vladimir Sementsov-Ogievskiy, 2016/11/22
- [Qemu-devel] [PATCH 05/21] block: fix bdrv_dirty_bitmap_granularity signature, Vladimir Sementsov-Ogievskiy, 2016/11/22
- [Qemu-devel] [PATCH 01/21] specs/qcow2: fix bitmap granularity qemu-specific note, Vladimir Sementsov-Ogievskiy, 2016/11/22
- [Qemu-devel] [PATCH 07/21] qcow2: add bitmaps extension, Vladimir Sementsov-Ogievskiy, 2016/11/22
- [Qemu-devel] [PATCH 02/21] specs/qcow2: do not use wording 'bitmap header', Vladimir Sementsov-Ogievskiy, 2016/11/22
- [Qemu-devel] [PATCH 03/21] hbitmap: improve dirty iter, Vladimir Sementsov-Ogievskiy, 2016/11/22
- [Qemu-devel] [PATCH 16/21] qmp: add persistent flag to block-dirty-bitmap-add, Vladimir Sementsov-Ogievskiy, 2016/11/22
- [Qemu-devel] [PATCH 14/21] block: add bdrv_can_store_dirty_bitmap, Vladimir Sementsov-Ogievskiy, 2016/11/22
- [Qemu-devel] [PATCH 10/21] block/dirty-bitmap: add autoload field to BdrvDirtyBitmap, Vladimir Sementsov-Ogievskiy, 2016/11/22
- [Qemu-devel] [PATCH 12/21] block/dirty-bitmap: add bdrv_dirty_bitmap_next(),
Vladimir Sementsov-Ogievskiy <=
- [Qemu-devel] [PATCH 08/21] block: introduce auto-loading bitmaps, Vladimir Sementsov-Ogievskiy, 2016/11/22
- [Qemu-devel] [PATCH 17/21] qmp: add autoload parameter to block-dirty-bitmap-add, Vladimir Sementsov-Ogievskiy, 2016/11/22
- [Qemu-devel] [PATCH 18/21] qmp: add x-debug-block-dirty-bitmap-sha256, Vladimir Sementsov-Ogievskiy, 2016/11/22
- [Qemu-devel] [PATCH 19/21] iotests: test qcow2 persistent dirty bitmap, Vladimir Sementsov-Ogievskiy, 2016/11/22
- [Qemu-devel] [PATCH 20/21] qcow2-refcount: rename inc_refcounts() and make it public, Vladimir Sementsov-Ogievskiy, 2016/11/22
- [Qemu-devel] [PATCH 09/21] qcow2: add .bdrv_load_autoloading_dirty_bitmaps, Vladimir Sementsov-Ogievskiy, 2016/11/22
- [Qemu-devel] [PATCH 13/21] qcow2: add .bdrv_store_persistent_dirty_bitmaps(), Vladimir Sementsov-Ogievskiy, 2016/11/22
- [Qemu-devel] [PATCH 15/21] qcow2: add .bdrv_can_store_dirty_bitmap, Vladimir Sementsov-Ogievskiy, 2016/11/22
- [Qemu-devel] [PATCH 06/21] block/dirty-bitmap: add deserialize_ones func, Vladimir Sementsov-Ogievskiy, 2016/11/22
- [Qemu-devel] [PATCH 21/21] qcow2-bitmap: refcounts, Vladimir Sementsov-Ogievskiy, 2016/11/22