diff options
author | John Snow <jsnow@redhat.com> | 2019-02-19 17:49:43 -0500 |
---|---|---|
committer | John Snow <jsnow@redhat.com> | 2019-02-19 17:49:43 -0500 |
commit | 73ab5d601c8b4311090a70e525f5970f70b8b2a0 (patch) | |
tree | 8baf9482d74fc73e98fe8855e60e0d0ffa603186 /block | |
parent | f67cf661f8b88afe8a5ea2f120583924cba9087f (diff) | |
download | qemu-73ab5d601c8b4311090a70e525f5970f70b8b2a0.zip |
block/dirty-bitmap: Documentation and Comment fixups
The meaning of the states has changed subtly over time,
this should bring the understanding more in-line with the
current, actual usages.
Reported-by: Eric Blake <eblake@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-id: 20190202011048.12343-1-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/dirty-bitmap.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c index e46f72b346..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; |