18.02.2019 16:57, Vladimir Sementsov-Ogievskiy wrote:
14.02.2019 2:23, John Snow wrote:
> "Frozen" was a good description a long time ago, but it isn't adequate
now.
> Rename the frozen predicate to has_successor to make the semantics of the
> predicate more clear to outside callers.
>
> In the process, remove some calls to frozen() that no longer semantically
> make sense. For enabled and disabled in particular, it's actually okay for
> the internals to do this but only forbidden for users to invoke them, and
I'm a bit lost in this paragraph.. to this - what?, to invoke them - whom?
I think, it would be simpler for me to read patch itself :)
> all of the QMP entry uses already check against qmp_locked.
>
> Several other assertions really want to check that the bitmap isn't in-use
> by another operation -- use the qmp_locked function for this instead, which
> presently also checks for has_successor.
hm, you mean user_locked, not qmp_locked.
>
> Signed-off-by: John Snow <jsnow(a)redhat.com>
> ---
> block/dirty-bitmap.c | 32 +++++++++++++++++---------------
> include/block/dirty-bitmap.h | 2 +-
> migration/block-dirty-bitmap.c | 2 +-
> 3 files changed, 19 insertions(+), 17 deletions(-)
>
> diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
> index 101383b3af..639ebc0645 100644
> --- a/block/dirty-bitmap.c
> +++ b/block/dirty-bitmap.c
> @@ -50,7 +50,7 @@ struct BdrvDirtyBitmap {
> HBitmap *meta; /* Meta dirty bitmap */
> bool qmp_locked; /* Bitmap is locked, it can't be modified
> through QMP */
> - BdrvDirtyBitmap *successor; /* Anonymous child; implies frozen status */
> + BdrvDirtyBitmap *successor; /* Anonymous child; implies user_locked state */
aha, looks like a good moment to fix preexisting misalignment of the comment,
but new line is exactly 80 characters length, so, not a good moment)
and there was no any misalignment, only thunderbird bug...
--
Best regards,
Vladimir