diff options
Diffstat (limited to 'block/dirty-bitmap.c')
-rw-r--r-- | block/dirty-bitmap.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c index a0eaa28785..68d295d6e3 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; |