qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v3 1/5] block/dirty-bitmaps: add user_modifiable


From: Eric Blake
Subject: Re: [Qemu-block] [PATCH v3 1/5] block/dirty-bitmaps: add user_modifiable status checker
Date: Wed, 26 Sep 2018 21:23:15 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0

On 9/26/18 7:19 AM, Vladimir Sementsov-Ogievskiy wrote:
26.09.2018 14:53, Vladimir Sementsov-Ogievskiy wrote:
26.09.2018 02:49, John Snow wrote:
Instead of both frozen and qmp_locked checks, wrap it into one check.
frozen implies the bitmap is split in two (for backup), and shouldn't
be modified. qmp_locked implies it's being used by another operation,
like being exported over NBD. In both cases it means we shouldn't allow
the user to modify it in any meaningful way.

Replace any usages where we check both frozen and qmp_locked with the
new check.


to reduce number of '!', we may use opposite check, for ex "bdrv_dirty_bitmap_user_locked".

bad reason to rewrite the whole series, so, ignore this comment)

Then again, if you change 'in-use' to 'in use' in the entire series, you might as well flip the logic (double-negative logic is slightly harder to follow than suitably-named positive logic).

At this point, I have not queued this series on my NBD queue, because there may indeed be a reason for v4 to touch up spelling and logic.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]