qemu-e2k/nbd
John Snow 3ae96d6684 block/dirty-bitmaps: add block_dirty_bitmap_check function
Instead of checking against busy, inconsistent, or read only directly,
use a check function with permissions bits that let us streamline the
checks without reproducing them in many places.

Included in this patch are permissions changes that simply add the
inconsistent check to existing permissions call spots, without
addressing existing bugs.

In general, this means that busy+readonly checks become BDRV_BITMAP_DEFAULT,
which checks against all three conditions. busy-only checks become
BDRV_BITMAP_ALLOW_RO.

Notably, remove allows inconsistent bitmaps, so it doesn't follow the pattern.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-id: 20190301191545.8728-4-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
2019-03-12 12:05:49 -04:00
..
Makefile.objs nbd: Split nbd.c 2016-01-15 18:58:02 +01:00
client.c nbd: Use low-level QIOChannel API in nbd_read_eof() 2019-02-25 15:03:19 +01:00
common.c nbd: generalize usage of nbd_read 2019-02-04 15:11:27 -06:00
nbd-internal.h nbd: Move nbd_read_eof() to nbd/client.c 2019-02-25 15:03:19 +01:00
server.c block/dirty-bitmaps: add block_dirty_bitmap_check function 2019-03-12 12:05:49 -04:00
trace-events nbd/client: Refactor nbd_opt_go() to support NBD_OPT_INFO 2019-01-21 15:49:52 -06:00