]> git.proxmox.com Git - mirror_qemu.git/commit - blockdev.c
block/dirty-bitmaps: add user_locked status checker
authorJohn Snow <jsnow@redhat.com>
Mon, 29 Oct 2018 20:23:16 +0000 (16:23 -0400)
committerJohn Snow <jsnow@redhat.com>
Mon, 29 Oct 2018 20:23:16 +0000 (16:23 -0400)
commit993edc0ce0c6f44deb8272a7a857e419417f5f84
treef45f81f8a4f3dcb77db140166c5c99ef6ce55642
parent2ea427effff61efa5d0dc69f9cae126d13879617
block/dirty-bitmaps: add user_locked status checker

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.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20181002230218.13949-2-jsnow@redhat.com
[w/edits Suggested-By: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>]
Signed-off-by: John Snow <jsnow@redhat.com>
block/dirty-bitmap.c
blockdev.c
include/block/dirty-bitmap.h
migration/block-dirty-bitmap.c