qemu-e2k/block
Max Reitz 705dde27c6 backup-top: Refuse I/O in inactive state
When the backup-top node transitions from active to inactive in
bdrv_backup_top_drop(), the BlockCopyState is freed and the filtered
child is removed, so the node effectively becomes unusable.

However, noone told its I/O functions this, so they will happily
continue accessing bs->backing and s->bcs.  Prevent that by aborting
early when s->active is false.

(After the preceding patch, the node should be gone after
bdrv_backup_top_drop(), so this should largely be a theoretical problem.
But still, better to be safe than sorry, and also I think it just makes
sense to check s->active in the I/O functions.)

Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210219153348.41861-3-mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2021-03-08 14:55:18 +01:00
..
export qapi: Use QAPI_LIST_APPEND in trivial cases 2021-01-28 08:08:45 +01:00
monitor block: rename and alter bdrv_all_find_snapshot semantics 2021-02-08 11:19:51 +00:00
accounting.c block/accounting: Use lock guard macros 2020-12-11 17:52:39 +01:00
aio_task.c
amend.c
backup-top.c backup-top: Refuse I/O in inactive state 2021-03-08 14:55:18 +01:00
backup-top.h qapi: backup: add perf.use-copy-range parameter 2021-01-26 14:36:37 +01:00
backup.c backup: Remove nodes from job in .clean() 2021-03-08 14:55:18 +01:00
blkdebug.c
blklogwrites.c
blkreplay.c
blkverify.c block/io: support int64_t bytes in read/write wrappers 2021-02-03 08:17:12 -06:00
block-backend.c block: Separate blk_is_writable() and blk_supports_write_perm() 2021-01-27 20:45:20 +01:00
block-copy.c block/block-copy: drop unused argument of block_copy() 2021-01-26 14:36:37 +01:00
block-gen.h
bochs.c
cloop.c
commit.c block: use return status of bdrv_append() 2021-02-12 15:39:44 -06:00
copy-on-read.c copy-on-read: skip non-guest reads if no copy needed 2021-01-26 14:36:37 +01:00
copy-on-read.h copy-on-read: add filter drop function 2021-01-26 11:26:54 +01:00
coroutines.h
create.c
crypto.c block: add bdrv_co_delete_file_noerr 2021-02-15 15:10:14 +01:00
crypto.h
curl.c curl: remove compatibility code, require 7.29.0 2021-01-02 21:03:37 +01:00
dirty-bitmap.c qapi: Use QAPI_LIST_APPEND in trivial cases 2021-01-28 08:08:45 +01:00
dmg-bz2.c
dmg-lzfse.c
dmg.c
dmg.h
file-posix.c block: refactor bdrv_check_request: add errp 2021-02-03 08:00:33 -06:00
file-win32.c
filter-compress.c
gluster.c qapi: More complex uses of QAPI_LIST_APPEND 2021-01-28 08:08:45 +01:00
io_uring.c
io.c block: add new BlockDriver handler: bdrv_cancel_in_flight 2021-02-12 09:45:18 -06:00
iscsi-opts.c
iscsi.c Remove superfluous timer_del() calls 2021-01-08 15:13:38 +00:00
linux-aio.c
meson.build meson: Propagate gnutls dependency 2021-01-12 12:38:03 +01:00
mirror.c bitmaps patches for 2021-02-12 2021-02-13 21:26:00 +00:00
nbd.c block/nbd: implement .bdrv_cancel_in_flight 2021-02-12 09:45:18 -06:00
nfs.c block/nfs: fix int overflow in nfs_client_open_qdict 2020-12-18 11:48:39 +01:00
null.c
nvme.c block/nvme: Trace NVMe spec version supported by the controller 2021-02-02 17:05:38 +01:00
parallels.c
parallels.h
preallocate.c block: introduce preallocate filter 2020-12-18 12:35:55 +01:00
qapi-sysemu.c
qapi.c block: Fix VM size column width in bdrv_snapshot_dump() 2021-02-02 17:23:55 +01:00
qcow2-bitmap.c qapi: Use QAPI_LIST_APPEND in trivial cases 2021-01-28 08:08:45 +01:00
qcow2-cache.c
qcow2-cluster.c qcow2: Fix corruption on write_zeroes with MAY_UNMAP 2020-11-24 11:29:41 +01:00
qcow2-refcount.c
qcow2-snapshot.c
qcow2-threads.c
qcow2.c block: qcow2: remove the created file on initialization error 2021-02-15 15:10:14 +01:00
qcow2.h
qcow.c
qed-check.c
qed-cluster.c
qed-l2-cache.c
qed-table.c
qed.c
qed.h
quorum.c quorum: Implement bdrv_co_pwrite_zeroes() 2020-12-18 12:35:55 +01:00
raw-format.c block/raw-format: implement .bdrv_cancel_in_flight handler 2021-02-12 09:45:18 -06:00
rbd.c qobject: Change qobject_to_json()'s value to GString 2020-12-19 10:38:43 +01:00
replication.c qapi: backup: add max-chunk and max-workers to x-perf struct 2021-01-26 14:36:37 +01:00
sheepdog.c
snapshot.c block: rename and alter bdrv_all_find_snapshot semantics 2021-02-08 11:19:51 +00:00
ssh.c
stream.c block: apply COR-filter to block-stream jobs 2021-01-26 14:36:37 +01:00
throttle-groups.c block/throttle-groups: throttle_group_co_io_limits_intercept(): 64bit bytes 2021-02-03 08:14:00 -06:00
throttle.c
trace-events block/io: use int64_t bytes in copy_range 2021-02-03 08:17:12 -06:00
trace.h
vdi.c
vhdx-endian.c
vhdx-log.c
vhdx.c
vhdx.h
vmdk.c qapi: Use QAPI_LIST_APPEND in trivial cases 2021-01-28 08:08:45 +01:00
vpc.c block/vpc: Use sizeof() instead of HEADER_SIZE for footer size 2020-12-18 12:43:30 +01:00
vvfat.c
win32-aio.c
write-threshold.c