qemu-e2k/block
Max Reitz c09ba36c9a block: Fail requests to empty BlockBackend
If there is no BlockDriverState in a BlockBackend or if the tray of the
guest device is open, fail all requests (where that is possible) with
-ENOMEDIUM.

The reason the status of the guest device is taken into account is
because once the guest device's tray is opened, any request on the same
BlockBackend as the guest uses should fail. If the BDS tree is supposed
to be usable even after ejecting it from the guest, a different
BlockBackend must be used.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2015-10-23 18:18:23 +02:00
..
accounting.c block: Remove wr_highest_sector from BlockAcctStats 2015-10-23 18:18:23 +02:00
archipelago.c block: remove superfluous '\n' around error_report/error_setg 2015-03-10 08:15:33 +03:00
backup.c block: Move I/O status and error actions into BB 2015-10-23 18:18:23 +02:00
blkdebug.c blkdebug: Don't confuse image as backing file 2015-10-16 15:35:48 +02:00
blkverify.c blkverify: Fix BDS leak in .bdrv_open error path 2015-10-16 15:34:30 +02:00
block-backend.c block: Fail requests to empty BlockBackend 2015-10-23 18:18:23 +02:00
bochs.c block: Convert bs->file to BdrvChild 2015-10-16 15:34:29 +02:00
cloop.c block: Convert bs->file to BdrvChild 2015-10-16 15:34:29 +02:00
commit.c block: Move I/O status and error actions into BB 2015-10-23 18:18:23 +02:00
curl.c block/curl: Don't lose original error when a connection fails. 2015-07-14 21:50:13 -04:00
dmg.c block: Convert bs->file to BdrvChild 2015-10-16 15:34:29 +02:00
gluster.c block: don't convert file size to sector size 2014-09-12 15:43:06 +02:00
io.c block: Move BlockAcctStats into BlockBackend 2015-10-23 18:18:23 +02:00
iscsi.c block/iscsi: validate block size returned from target 2015-09-07 18:14:03 +02:00
linux-aio.c linux-aio: simplify removal of completed iocbs from the list 2014-12-12 16:57:55 +00:00
Makefile.objs block: convert quorum blockdrv to use crypto APIs 2015-07-08 13:11:01 +02:00
mirror.c block: Move I/O status and error actions into BB 2015-10-23 18:18:23 +02:00
nbd-client.c nbd: Set block size to BDRV_SECTOR_SIZE 2015-03-18 12:07:01 +01:00
nbd-client.h nbd: Set block size to BDRV_SECTOR_SIZE 2015-03-18 12:07:01 +01:00
nbd.c nbd: convert to use the QAPI SocketAddress object 2015-09-25 12:04:40 +02:00
nfs.c block/nfs: cache allocated filesize for read-only files 2015-09-25 08:37:07 -04:00
null.c block/null: Support reopen 2015-04-28 15:36:09 +02:00
parallels.c block: Convert bs->file to BdrvChild 2015-10-16 15:34:29 +02:00
qapi.c block: Move I/O status and error actions into BB 2015-10-23 18:18:23 +02:00
qcow2-cache.c block: Convert bs->file to BdrvChild 2015-10-16 15:34:29 +02:00
qcow2-cluster.c block: Convert bs->backing_hd to BdrvChild 2015-10-16 15:34:29 +02:00
qcow2-refcount.c block: Convert bs->file to BdrvChild 2015-10-16 15:34:29 +02:00
qcow2-snapshot.c block: Convert bs->file to BdrvChild 2015-10-16 15:34:29 +02:00
qcow2.c block: Convert bs->backing_hd to BdrvChild 2015-10-16 15:34:29 +02:00
qcow2.h coroutine: move into libqemuutil.a library 2015-10-20 14:59:04 +01:00
qcow.c block: Convert bs->backing_hd to BdrvChild 2015-10-16 15:34:29 +02:00
qed-check.c block: Use g_new() & friends to avoid multiplying sizes 2014-08-20 11:51:28 +02:00
qed-cluster.c
qed-gencb.c block: Rename BlockDriverCompletionFunc to BlockCompletionFunc 2014-10-20 13:41:27 +02:00
qed-l2-cache.c qed: do not evict in-use L2 table cache entries 2012-03-12 15:14:06 +01:00
qed-table.c block: Convert bs->file to BdrvChild 2015-10-16 15:34:29 +02:00
qed.c block: Remove bdrv_swap() 2015-10-16 15:34:30 +02:00
qed.h qed: Really remove unused field QEDAIOCB.finished 2015-02-06 17:24:21 +01:00
quorum.c quorum: Convert to BdrvChild 2015-10-16 15:34:29 +02:00
raw_bsd.c block/raw_bsd: Drop raw_is_inserted() 2015-10-23 18:18:23 +02:00
raw-aio.h linux-aio: drop return code from laio_io_unplug and ioq_submit 2014-12-12 16:57:55 +00:00
raw-posix.c block: Make bdrv_is_inserted() return a bool 2015-10-23 18:18:22 +02:00
raw-win32.c block: switch from g_slice allocator to malloc 2015-10-12 11:17:45 +01:00
rbd.c rbd: fix ceph settings precedence 2015-07-14 17:15:23 +02:00
sheepdog.c sheepdog: refine discard support 2015-09-25 10:25:19 -04:00
snapshot.c block: Convert bs->file to BdrvChild 2015-10-16 15:34:29 +02:00
ssh.c block/ssh: remove dead code 2015-10-08 19:46:01 +03:00
stream.c block: Move I/O status and error actions into BB 2015-10-23 18:18:23 +02:00
throttle-groups.c block/throttle-groups: Make incref/decref public 2015-10-23 18:18:23 +02:00
vdi.c coroutine: move into libqemuutil.a library 2015-10-20 14:59:04 +01:00
vhdx-endian.c block: VHDX endian fixes 2014-08-15 15:07:14 +02:00
vhdx-log.c block: Convert bs->file to BdrvChild 2015-10-16 15:34:29 +02:00
vhdx.c block: Convert bs->file to BdrvChild 2015-10-16 15:34:29 +02: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: Convert bs->backing_hd to BdrvChild 2015-10-16 15:34:29 +02:00
vpc.c block: Convert bs->file to BdrvChild 2015-10-16 15:34:29 +02:00
vvfat.c block: Remove bdrv_swap() 2015-10-16 15:34:30 +02:00
win32-aio.c block: Rename BlockDriverCompletionFunc to BlockCompletionFunc 2014-10-20 13:41:27 +02:00
write-threshold.c coroutine: move into libqemuutil.a library 2015-10-20 14:59:04 +01:00