qemu/block
Kevin Wolf d5e6f437c5 block: Let callers request permissions when attaching a child node
When attaching a node as a child to a new parent, the required and
shared permissions for this parent are checked against all other parents
of the node now, and an error is returned if there is a conflict.

This allows error returns to a function that previously always
succeeded, and the same is true for quite a few callers and their
callers. Converting all of them within the same patch would be too much,
so for now everyone tells that they don't need any permissions and allow
everyone else to do anything. This way we can use &error_abort initially
and convert caller by caller to pass actual permission requirements and
implement error handling.

All these places are marked with FIXME comments and it will be the job
of the next patches to clean them up again.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Acked-by: Fam Zheng <famz@redhat.com>
2017-02-28 20:40:36 +01:00
..
accounting.c block: Clean up includes 2016-01-20 13:36:23 +01:00
archipelago.c block: explicitly acquire aiocontext in aio callbacks that need it 2017-02-21 11:39:39 +00:00
backup.c coroutine-lock: add mutex argument to CoQueue APIs 2017-02-21 11:39:40 +00:00
blkdebug.c block: Pass BdrvChild to bdrv_truncate() 2017-02-24 16:09:23 +01:00
blkreplay.c block: explicitly acquire aiocontext in bottom halves that need it 2017-02-21 11:39:39 +00:00
blkverify.c blkverify: Implement bdrv_co_preadv/pwritev/flush 2017-01-09 13:30:52 +01:00
block-backend.c block: Let callers request permissions when attaching a child node 2017-02-28 20:40:36 +01:00
bochs.c block: Attach bs->file only during .bdrv_open() 2017-02-24 16:09:23 +01:00
cloop.c block: Attach bs->file only during .bdrv_open() 2017-02-24 16:09:23 +01:00
commit.c blockjob: add block_job_start 2016-11-14 22:47:34 -05:00
crypto.c block: Attach bs->file only during .bdrv_open() 2017-02-24 16:09:23 +01:00
curl.c curl: do not use aio_context_acquire/release 2017-02-27 13:33:24 +00:00
dirty-bitmap.c block: More operations for meta dirty bitmap 2016-10-24 17:56:07 +02:00
dmg-bz2.c dmg: Move libbz2 code to dmg-bz2.so 2016-10-07 14:14:06 +02:00
dmg.c block: Attach bs->file only during .bdrv_open() 2017-02-24 16:09:23 +01:00
dmg.h dmg: Move libbz2 code to dmg-bz2.so 2016-10-07 14:14:06 +02:00
file-posix.c qemu-img: Improve documentation for PREALLOC_MODE_FALLOC 2017-02-24 16:09:23 +01:00
file-win32.c block: Rename raw-{posix,win32} to file-*.c 2017-01-09 13:30:53 +01:00
gluster.c block: explicitly acquire aiocontext in bottom halves that need it 2017-02-21 11:39:39 +00:00
io.c coroutine-lock: add mutex argument to CoQueue APIs 2017-02-21 11:39:40 +00:00
iscsi-opts.c block/iscsi: statically link qemu_iscsi_opts 2017-01-27 18:07:58 +01:00
iscsi.c iscsi: do not use aio_context_acquire/release 2017-02-27 13:58:58 +00:00
linux-aio.c block: explicitly acquire aiocontext in aio callbacks that need it 2017-02-21 11:39:39 +00:00
Makefile.objs block/iscsi: statically link qemu_iscsi_opts 2017-01-27 18:07:58 +01:00
mirror.c block/mirror: fix broken sparseness detection 2017-02-27 14:02:31 -05:00
nbd-client.c coroutine-lock: add mutex argument to CoQueue APIs 2017-02-21 11:39:40 +00:00
nbd-client.h nbd: convert to use qio_channel_yield 2017-02-21 11:14:08 +00:00
nbd.c block: Don't bother asserting type of output visitor's output 2017-02-22 19:52:20 +01:00
nfs.c nfs: do not use aio_context_acquire/release 2017-02-27 13:58:53 +00:00
null.c block: explicitly acquire aiocontext in aio callbacks that need it 2017-02-21 11:39:39 +00:00
parallels.c block: Attach bs->file only during .bdrv_open() 2017-02-24 16:09:23 +01:00
qapi.c block: Don't bother asserting type of output visitor's output 2017-02-22 19:52:20 +01:00
qcow2-cache.c qcow2: Remove stale comment 2016-11-25 13:51:30 +01:00
qcow2-cluster.c coroutine-lock: add mutex argument to CoQueue APIs 2017-02-21 11:39:40 +00:00
qcow2-refcount.c block: Pass BdrvChild to bdrv_truncate() 2017-02-24 16:09:23 +01:00
qcow2-snapshot.c block: Convert bdrv_pwrite(v/_sync) to BdrvChild 2016-07-05 16:46:27 +02:00
qcow2.c block: Attach bs->file only during .bdrv_open() 2017-02-24 16:09:23 +01:00
qcow2.h qcow2: Optimize the refcount-block overlap check 2017-02-12 00:47:43 +01:00
qcow.c block: Attach bs->file only during .bdrv_open() 2017-02-24 16:09:23 +01:00
qed-check.c qed: Use DIV_ROUND_UP 2016-06-07 18:19:24 +03:00
qed-cluster.c block: explicitly acquire aiocontext in aio callbacks that need it 2017-02-21 11:39:39 +00:00
qed-gencb.c block: Clean up includes 2016-01-20 13:36:23 +01:00
qed-l2-cache.c block: Clean up includes 2016-01-20 13:36:23 +01:00
qed-table.c block: explicitly acquire aiocontext in aio callbacks that need it 2017-02-21 11:39:39 +00:00
qed.c block: Attach bs->file only during .bdrv_open() 2017-02-24 16:09:23 +01:00
qed.h block: explicitly acquire aiocontext in timers that need it 2017-02-21 11:14:08 +00:00
quorum.c block: Add Error argument to bdrv_attach_child() 2017-02-28 20:40:35 +01:00
raw-format.c block: Attach bs->file only during .bdrv_open() 2017-02-24 16:09:23 +01:00
rbd.c RBD: Add support readv,writev for rbd 2017-02-24 12:43:01 -05:00
replication.c block: Attach bs->file only during .bdrv_open() 2017-02-24 16:09:23 +01:00
sheepdog.c coroutine-lock: add mutex argument to CoQueue APIs 2017-02-21 11:39:40 +00:00
snapshot.c error: Remove NULL checks on error_propagate() calls 2016-06-20 16:38:13 +02:00
ssh.c block: explicitly acquire aiocontext in callbacks that need it 2017-02-21 11:39:36 +00:00
stream.c blockjob: add block_job_start 2016-11-14 22:47:34 -05:00
throttle-groups.c coroutine-lock: add mutex argument to CoQueue APIs 2017-02-21 11:39:40 +00:00
trace-events trace: clean up trace-events files 2017-01-31 17:12:15 +00:00
vdi.c block: Attach bs->file only during .bdrv_open() 2017-02-24 16:09:23 +01:00
vhdx-endian.c vhdx: Use QEMU UUID API 2016-09-23 11:42:52 +08:00
vhdx-log.c block: Pass BdrvChild to bdrv_truncate() 2017-02-24 16:09:23 +01:00
vhdx.c block: Attach bs->file only during .bdrv_open() 2017-02-24 16:09:23 +01:00
vhdx.h block: vhdx - update PAYLOAD_BLOCK_UNMAPPED value to match 1.00 spec 2014-12-12 15:42:22 +00:00
vmdk.c block: Attach bs->file only during .bdrv_open() 2017-02-24 16:09:23 +01:00
vpc.c block: Attach bs->file only during .bdrv_open() 2017-02-24 16:09:23 +01:00
vvfat.c vvfat: Use opened node as backing file 2017-02-24 16:09:23 +01:00
win32-aio.c block: explicitly acquire aiocontext in aio callbacks that need it 2017-02-21 11:39:39 +00:00
write-threshold.c block: use bdrv_add_before_write_notifier 2016-10-07 13:34:07 +02:00