diff options
author | Peter Maydell | 2019-02-21 14:09:33 +0100 |
---|---|---|
committer | Peter Maydell | 2019-02-21 14:09:33 +0100 |
commit | fc3dbb90f2eb069801bfb4cfe9cbc83cf9c5f4a9 (patch) | |
tree | 645f74fe88345a863debb284cf7ac5d3527f1af7 /block/dirty-bitmap.c | |
parent | Merge remote-tracking branch 'remotes/kraxel/tags/usb-20190220-pull-request' ... (diff) | |
parent | blockdev: acquire aio_context for bitmap add/remove (diff) | |
download | qemu-fc3dbb90f2eb069801bfb4cfe9cbc83cf9c5f4a9.tar.gz qemu-fc3dbb90f2eb069801bfb4cfe9cbc83cf9c5f4a9.tar.xz qemu-fc3dbb90f2eb069801bfb4cfe9cbc83cf9c5f4a9.zip |
Merge remote-tracking branch 'remotes/jnsnow/tags/bitmaps-pull-request' into staging
Pull request
# gpg: Signature made Wed 20 Feb 2019 18:01:00 GMT
# gpg: using RSA key F9B7ABDBBCACDF95BE76CBD07DEF8106AAFC390E
# gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>" [full]
# Primary key fingerprint: FAEB 9711 A12C F475 812F 18F2 88A9 064D 1835 61EB
# Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76 CBD0 7DEF 8106 AAFC 390E
* remotes/jnsnow/tags/bitmaps-pull-request:
blockdev: acquire aio_context for bitmap add/remove
block/dirty-bitmap: Documentation and Comment fixups
dirty-bitmap: Expose persistent flag to 'query-block'
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'block/dirty-bitmap.c')
-rw-r--r-- | block/dirty-bitmap.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c index 00ea36f554..c6d4acebfa 100644 --- a/block/dirty-bitmap.c +++ b/block/dirty-bitmap.c @@ -29,12 +29,20 @@ #include "block/blockjob.h" /** - * A BdrvDirtyBitmap can be in three possible states: - * (1) successor is NULL and disabled is false: full r/w mode - * (2) successor is NULL and disabled is true: read only mode ("disabled") - * (3) successor is set: frozen mode. - * A frozen bitmap cannot be renamed, deleted, anonymized, cleared, set, - * or enabled. A frozen bitmap can only abdicate() or reclaim(). + * 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), + * but 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. */ struct BdrvDirtyBitmap { QemuMutex *mutex; @@ -440,6 +448,7 @@ BlockDirtyInfoList *bdrv_query_dirty_bitmaps(BlockDriverState *bs) info->has_name = !!bm->name; info->name = g_strdup(bm->name); info->status = bdrv_dirty_bitmap_status(bm); + info->persistent = bm->persistent; entry->value = info; *plist = entry; plist = &entry->next; |