[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 1/5] block/dirty-bitmap: add recording and busy
From: |
Vladimir Sementsov-Ogievskiy |
Subject: |
Re: [Qemu-block] [PATCH 1/5] block/dirty-bitmap: add recording and busy properties |
Date: |
Wed, 13 Feb 2019 09:31:02 +0000 |
On 12.02.2019 1:02, John Snow wrote:
> The current API allows us to report a single status, which we've defined as:
>
> Frozen: has a successor, treated as qmp_locked, may or may not be enabled.
> Locked: no successor, qmp_locked. may or may not be enabled.
> Disabled: Not frozen or locked, disabled.
> Active: Not frozen, locked, or disabled.
>
> The problem is that both "Frozen" and "Locked" mean nearly the same thing,
> and that both of them do not intuit whether they are recording guest writes
> or not.
>
> This patch deprecates that status field and introduces two orthogonal
> properties instead to replace it.
> ---
> block/dirty-bitmap.c | 9 +++++++++
> qapi/block-core.json | 9 ++++++++-
> tests/qemu-iotests/236.out | 28 ++++++++++++++++++++++++++++
> 3 files changed, 45 insertions(+), 1 deletion(-)
>
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index 5a0f5f5a95..275f0d573c 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -455,7 +455,13 @@
> #
> # @granularity: granularity of the dirty bitmap in bytes (since 1.4)
> #
> -# @status: current status of the dirty bitmap (since 2.4)
> +# @status: Deprecated in favor of @recording and @locked. (since 4.0)
> +#
> +# @recording: true if the bitmap is recording new writes from the guest.
> +# Replaces `active` status. (since 4.0)
> +#
> +# @busy: true if the bitmap is in-use by some operation (NBD or jobs)
> +# and cannot be modified via QMP right now. (since 4.0)
not only modified, but also cannot be used somehow for any other operation.
> #
> # @persistent: true if the bitmap will eventually be flushed to persistent
> # storage (since 4.0)
> @@ -464,6 +470,7 @@
> ##
> { 'struct': 'BlockDirtyInfo',
> 'data': {'*name': 'str', 'count': 'int', 'granularity': 'uint32',
> + 'recording': 'bool', 'busy': 'bool',
> 'status': 'DirtyBitmapStatus', 'persistent': 'bool' } }
>
- [Qemu-block] [PATCH 0/5] dirty-bitmaps: deprecate @status field, John Snow, 2019/02/11
- [Qemu-block] [PATCH 1/5] block/dirty-bitmap: add recording and busy properties, John Snow, 2019/02/11
- [Qemu-block] [PATCH 2/5] block/dirty-bitmaps: rename frozen predicate helper, John Snow, 2019/02/11
- [Qemu-block] [PATCH 5/5] block/dirty-bitmaps: unify qmp_locked and user_locked calls, John Snow, 2019/02/11
- [Qemu-block] [PATCH 4/5] block/dirty-bitmap: explicitly lock bitmaps with successors, John Snow, 2019/02/11
- [Qemu-block] [PATCH 3/5] block/dirty-bitmap: change semantics of enabled predicate, John Snow, 2019/02/11