aboutsummaryrefslogtreecommitdiff
path: root/include/block
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2015-05-12 15:53:01 -0400
committerMarkus Armbruster <armbru@redhat.com>2015-05-29 12:53:12 +0200
commit9abe3bdc45ced367fe034c0fdd7c686212389767 (patch)
tree61510db30667eb384a720e9020d7a01c1d637182 /include/block
parentba7c388963e099c0d2cedb7f048e30747ffff25d (diff)
qapi: add dirty bitmap status
Bitmaps can be in a handful of different states with potentially more to come as we tool around with migration and persistence patches. Management applications may need to know why certain bitmaps are unavailable for various commands, e.g. busy in another operation, busy being migrated, etc. Right now, all we offer is BlockDirtyInfo's boolean member 'frozen'. Instead of adding more booleans, replace it by an enumeration member 'status' with values 'active' and 'frozen'. Then add new value 'disabled'. Incompatible change. Fine because the changed part hasn't been released so far. Suggested-by: Eric Blake <eblake@redhat.com> Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> [Commit message tweaked] Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r--include/block/block.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/block/block.h b/include/block/block.h
index c1c963eb5c..f7680b6e68 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -476,6 +476,7 @@ uint32_t bdrv_get_default_bitmap_granularity(BlockDriverState *bs);
uint32_t bdrv_dirty_bitmap_granularity(BdrvDirtyBitmap *bitmap);
bool bdrv_dirty_bitmap_enabled(BdrvDirtyBitmap *bitmap);
bool bdrv_dirty_bitmap_frozen(BdrvDirtyBitmap *bitmap);
+DirtyBitmapStatus bdrv_dirty_bitmap_status(BdrvDirtyBitmap *bitmap);
int bdrv_get_dirty(BlockDriverState *bs, BdrvDirtyBitmap *bitmap, int64_t sector);
void bdrv_set_dirty_bitmap(BdrvDirtyBitmap *bitmap,
int64_t cur_sector, int nr_sectors);