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