]> git.proxmox.com Git - mirror_qemu.git/commit - block/blkdebug.c
block: Use bdrv_default_perms()
authorMax Reitz <mreitz@redhat.com>
Wed, 13 May 2020 11:05:39 +0000 (13:05 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 18 May 2020 17:05:25 +0000 (19:05 +0200)
commit69dca43d6b6819b3d0895364692e2d0445674916
treed5d337c1400c110d2714bf7012aef655e73db040
parenta16be3cdfce2379b5fb0a17a3017a6c59d73388d
block: Use bdrv_default_perms()

bdrv_default_perms() can decide which permission profile to use based on
the BdrvChildRole, so block drivers do not need to select it explicitly.

The blkverify driver now no longer shares the WRITE permission for the
image to verify.  We thus have to adjust two places in
test-block-iothread not to take it.  (Note that in theory, blkverify
should behave like quorum in this regard and share neither WRITE nor
RESIZE for both of its children.  In practice, it does not really
matter, because blkverify is used only for debugging, so we might as
well keep its permissions rather liberal.)

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200513110544.176672-30-mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
23 files changed:
block/backup-top.c
block/blkdebug.c
block/blklogwrites.c
block/blkreplay.c
block/blkverify.c
block/bochs.c
block/cloop.c
block/crypto.c
block/dmg.c
block/filter-compress.c
block/parallels.c
block/qcow.c
block/qcow2.c
block/qed.c
block/raw-format.c
block/throttle.c
block/vdi.c
block/vhdx.c
block/vmdk.c
block/vpc.c
tests/test-bdrv-drain.c
tests/test-bdrv-graph-mod.c
tests/test-block-iothread.c