aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2017-06-28 15:05:18 +0300
committerMax Reitz <mreitz@redhat.com>2017-07-11 17:44:58 +0200
commit3dd10a06d173e0904c6d47ced1de67c40139d5b1 (patch)
treeae43acf8310170802fd0c9c0a5dcac827939f6a9 /block
parenta88b179fdbc68e00ae5eacd49e1bccad32440b5a (diff)
downloadqemu-3dd10a06d173e0904c6d47ced1de67c40139d5b1.zip
qemu-3dd10a06d173e0904c6d47ced1de67c40139d5b1.tar.gz
qemu-3dd10a06d173e0904c6d47ced1de67c40139d5b1.tar.bz2
block/dirty-bitmap: add bdrv_dirty_bitmap_next()
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 20170628120530.31251-19-vsementsov@virtuozzo.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/dirty-bitmap.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
index 3c17c45..d146941 100644
--- a/block/dirty-bitmap.c
+++ b/block/dirty-bitmap.c
@@ -718,3 +718,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);
+}