aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2021-02-19 19:19:54 +0000
committerDaniel P. Berrangé <berrange@redhat.com>2021-03-18 09:22:55 +0000
commit81cbfd5088690c53541ffd0d74851c8ab055a829 (patch)
tree6bc7736b733cb05c4d24f5383f568c0ec79d3aae /block
parentad1324e044240ae9fcf67e4c215481b7a35591b9 (diff)
downloadqemu-81cbfd5088690c53541ffd0d74851c8ab055a829.zip
qemu-81cbfd5088690c53541ffd0d74851c8ab055a829.tar.gz
qemu-81cbfd5088690c53541ffd0d74851c8ab055a829.tar.bz2
block: remove dirty bitmaps 'status' field
The same information is available via the 'recording' and 'busy' fields. Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/dirty-bitmap.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
index a0eaa28..68d295d 100644
--- a/block/dirty-bitmap.c
+++ b/block/dirty-bitmap.c
@@ -166,43 +166,6 @@ bool bdrv_dirty_bitmap_enabled(BdrvDirtyBitmap *bitmap)
return !bitmap->disabled;
}
-/**
- * bdrv_dirty_bitmap_status: This API is now deprecated.
- * Called with BQL taken.
- *
- * A BdrvDirtyBitmap can be in four possible user-visible states:
- * (1) Active: successor is NULL, and disabled is false: full r/w mode
- * (2) Disabled: successor is NULL, and disabled is true: qualified r/w mode,
- * guest writes are dropped, but monitor writes are possible,
- * through commands like merge and clear.
- * (3) Frozen: successor is not NULL.
- * A frozen bitmap cannot be renamed, deleted, cleared, set,
- * enabled, merged to, etc. A frozen bitmap can only abdicate()
- * or reclaim().
- * In this state, the anonymous successor bitmap may be either
- * Active and recording writes from the guest (e.g. backup jobs),
- * or it can be Disabled and not recording writes.
- * (4) Locked: Whether Active or Disabled, the user cannot modify this bitmap
- * in any way from the monitor.
- * (5) Inconsistent: This is a persistent bitmap whose "in use" bit is set, and
- * is unusable by QEMU. It can be deleted to remove it from
- * the qcow2.
- */
-DirtyBitmapStatus bdrv_dirty_bitmap_status(BdrvDirtyBitmap *bitmap)
-{
- if (bdrv_dirty_bitmap_inconsistent(bitmap)) {
- return DIRTY_BITMAP_STATUS_INCONSISTENT;
- } else if (bdrv_dirty_bitmap_has_successor(bitmap)) {
- return DIRTY_BITMAP_STATUS_FROZEN;
- } else if (bdrv_dirty_bitmap_busy(bitmap)) {
- return DIRTY_BITMAP_STATUS_LOCKED;
- } else if (!bdrv_dirty_bitmap_enabled(bitmap)) {
- return DIRTY_BITMAP_STATUS_DISABLED;
- } else {
- return DIRTY_BITMAP_STATUS_ACTIVE;
- }
-}
-
/* Called with BQL taken. */
static bool bdrv_dirty_bitmap_recording(BdrvDirtyBitmap *bitmap)
{
@@ -582,7 +545,6 @@ BlockDirtyInfoList *bdrv_query_dirty_bitmaps(BlockDriverState *bs)
info->granularity = bdrv_dirty_bitmap_granularity(bm);
info->has_name = !!bm->name;
info->name = g_strdup(bm->name);
- info->status = bdrv_dirty_bitmap_status(bm);
info->recording = bdrv_dirty_bitmap_recording(bm);
info->busy = bdrv_dirty_bitmap_busy(bm);
info->persistent = bm->persistent;