[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH 12/24] block/dirty-bitmap: add bdrv_dirty_bitmap_nex
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
[Qemu-block] [PATCH 12/24] block/dirty-bitmap: add bdrv_dirty_bitmap_next() |
Date: |
Mon, 23 Jan 2017 15:10:24 +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 4d026df1bd..fe34d488aa 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 8dbd16b040..d71edc4d13 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
--
2.11.0
- [Qemu-block] [PATCH 07/24] qcow2: add bitmaps extension, (continued)
- [Qemu-block] [PATCH 16/24] qmp: add persistent flag to block-dirty-bitmap-add, Vladimir Sementsov-Ogievskiy, 2017/01/23
- [Qemu-block] [PATCH 15/24] qcow2: add .bdrv_can_store_new_dirty_bitmap, Vladimir Sementsov-Ogievskiy, 2017/01/23
- [Qemu-block] [PATCH 17/24] qmp: add autoload parameter to block-dirty-bitmap-add, Vladimir Sementsov-Ogievskiy, 2017/01/23
- [Qemu-block] [PATCH 02/24] specs/qcow2: do not use wording 'bitmap header', Vladimir Sementsov-Ogievskiy, 2017/01/23
- [Qemu-block] [PATCH 12/24] block/dirty-bitmap: add bdrv_dirty_bitmap_next(),
Vladimir Sementsov-Ogievskiy <=
- [Qemu-block] [PATCH 11/24] block: introduce persistent dirty bitmaps, Vladimir Sementsov-Ogievskiy, 2017/01/23
- [Qemu-block] [PATCH 21/24] qcow2-bitmap: refcounts, Vladimir Sementsov-Ogievskiy, 2017/01/23
- [Qemu-block] [PATCH 20/24] qcow2-refcount: rename inc_refcounts() and make it public, Vladimir Sementsov-Ogievskiy, 2017/01/23
- [Qemu-block] [PATCH 09/24] qcow2: add .bdrv_load_autoloading_dirty_bitmaps, Vladimir Sementsov-Ogievskiy, 2017/01/23