qemu-e2k/block
Peter Maydell 6394578984 block/io: Check for replay-enabled in bdrv_drain_all_begin()
In commit da0bd74434 we refactored bdrv_drain_all_begin() to pull out
the non-polling part into bdrv_drain_all_begin_nopoll().  This change
broke record-and-replay, because the "return early if replay enabled"
check is now in the sub-function bdrv_drain_all_begin_nopoll(), and
so it only causes us to return from that function, and not from the
calling bdrv_drain_all_begin().

Fix the regression by checking whether replay is enabled in both
functions.

The breakage and fix can be tested via 'make check-avocado': the
tests/avocado/reverse_debugging.py:ReverseDebugging_X86_64.test_x86_64_pc
tests/avocado/reverse_debugging.py:ReverseDebugging_AArch64.test_aarch64_virt
tests were both broken by this.

Fixes: da0bd74434 ("block: Factor out bdrv_drain_all_begin_nopoll()")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Fabiano Rosas <farosas@suse.de>
Message-id: 20221220174638.2156308-1-peter.maydell@linaro.org
2022-12-21 12:38:17 +00:00
..
export qapi block: Elide redundant has_FOO in generated C 2022-12-14 20:03:25 +01:00
monitor qapi block: Elide redundant has_FOO in generated C 2022-12-14 20:03:25 +01:00
accounting.c block: add missed block_acct_setup with new block device init procedure 2022-09-30 18:42:34 +02:00
aio_task.c
amend.c block/amend: Keep strong reference to BDS 2022-03-04 18:18:26 +01:00
backup.c backup: remove incorrect coroutine_fn annotation 2022-10-27 20:14:11 +02:00
blkdebug.c qemu-config: Make config_parse_qdict() return bool 2022-12-14 16:19:35 +01:00
blkio.c block/blkio: Set BlockDriver::has_variable_length to false 2022-11-10 14:52:36 +01:00
blklogwrites.c block/blklogwrites: don't care to remove bs->file child on failure 2022-10-27 20:14:11 +02:00
blkreplay.c block: introduce bdrv_open_file_child() helper 2022-10-27 20:14:11 +02:00
blkverify.c Block layer patches 2022-10-30 15:15:12 -04:00
block-backend.c block-backend: replace bdrv_*_above with blk_*_above 2022-12-15 16:07:43 +01:00
block-copy.c block-copy: add coroutine_fn annotations 2022-12-15 16:07:43 +01:00
block-gen.h block-coroutine-wrapper.py: support also basic return types 2022-12-15 16:07:43 +01:00
block-ram-registrar.c block: add BlockRAMRegistrar 2022-10-26 14:56:42 -04:00
bochs.c block: introduce bdrv_open_file_child() helper 2022-10-27 20:14:11 +02:00
cloop.c block: introduce bdrv_open_file_child() helper 2022-10-27 20:14:11 +02:00
commit.c block-backend: replace bdrv_*_above with blk_*_above 2022-12-15 16:07:43 +01:00
copy-before-write.c Miscellaneous patches for 2022-12-14 2022-12-15 10:13:46 +00:00
copy-before-write.h block/copy-before-write.h: global state API + assertions 2022-03-04 18:18:25 +01:00
copy-on-read.c block: introduce bdrv_open_file_child() helper 2022-10-27 20:14:11 +02:00
copy-on-read.h Clean up ill-advised or unusual header guards 2022-05-11 16:50:01 +02:00
coroutines.h block: GRAPH_RDLOCK for functions only called by co_wrappers 2022-12-15 16:08:23 +01:00
create.c block_int-common.h: assertions in the callers of BlockDriver function pointers 2022-03-04 18:18:25 +01:00
crypto.c block: bdrv_create_file is a coroutine_fn 2022-12-15 16:07:43 +01:00
crypto.h
curl.c curl: add missing coroutine_fn annotations 2022-10-07 12:11:41 +02:00
dirty-bitmap.c block/dirty-bitmap: convert coroutine-only functions to co_wrapper 2022-12-15 16:07:43 +01:00
dmg-bz2.c
dmg-lzfse.c
dmg.c dmg: warn when opening dmg images containing blocks of unknown type 2022-11-06 09:48:50 +01:00
dmg.h
file-posix.c block: add BDRV_REQ_REGISTERED_BUF request flag 2022-10-26 14:56:42 -04:00
file-win32.c
filter-compress.c block: introduce bdrv_open_file_child() helper 2022-10-27 20:14:11 +02:00
gluster.c qapi block: Elide redundant has_FOO in generated C 2022-12-14 20:03:25 +01:00
graph-lock.c graph-lock: TSA annotations for lock/unlock functions 2022-12-15 16:08:23 +01:00
io_uring.c block/io_uring: revert "Use io_uring_register_ring_fd() to skip fd operations" 2022-10-27 20:14:11 +02:00
io.c block/io: Check for replay-enabled in bdrv_drain_all_begin() 2022-12-21 12:38:17 +00:00
iscsi-opts.c
iscsi.c iscsi: add missing coroutine_fn annotations 2022-10-07 12:11:40 +02:00
linux-aio.c misc: fix commonly doubled up words 2022-08-01 11:58:02 +02:00
meson.build graph-lock: Introduce a lock to protect block graph operations 2022-12-15 16:07:43 +01:00
mirror.c block/mirror: Fix NULL s->job in active writes 2022-11-10 13:33:55 +01:00
nbd.c block: add BDRV_REQ_REGISTERED_BUF request flag 2022-10-26 14:56:42 -04:00
nfs.c block/nfs: Fix 32-bit Windows build 2022-10-27 20:14:11 +02:00
null.c
nvme.c block: return errors from bdrv_register_buf() 2022-10-26 14:56:42 -04:00
parallels-ext.c block: Change bdrv_{pread,pwrite,pwrite_sync}() param order 2022-07-12 12:14:55 +02:00
parallels.c block: bdrv_create_file is a coroutine_fn 2022-12-15 16:07:43 +01:00
parallels.h
preallocate.c block: introduce bdrv_open_file_child() helper 2022-10-27 20:14:11 +02:00
progress_meter.c
qapi-sysemu.c qapi block: Elide redundant has_FOO in generated C 2022-12-14 20:03:25 +01:00
qapi.c qapi block: Elide redundant has_FOO in generated C 2022-12-14 20:03:25 +01:00
qcow2-bitmap.c qcow2: manually add more coroutine_fn annotations 2022-10-27 20:14:11 +02:00
qcow2-cache.c block: Change bdrv_{pread,pwrite,pwrite_sync}() param order 2022-07-12 12:14:55 +02:00
qcow2-cluster.c qcow2: switch to *_co_* functions 2022-10-27 20:14:11 +02:00
qcow2-refcount.c qcow2: switch to *_co_* functions 2022-10-27 20:14:11 +02:00
qcow2-snapshot.c qcow2: switch to *_co_* functions 2022-10-27 20:14:11 +02:00
qcow2-threads.c
qcow2.c block: bdrv_create_file is a coroutine_fn 2022-12-15 16:07:43 +01:00
qcow2.h qcow2: manually add more coroutine_fn annotations 2022-10-27 20:14:11 +02:00
qcow.c block: bdrv_create_file is a coroutine_fn 2022-12-15 16:07:43 +01:00
qed-check.c
qed-cluster.c
qed-l2-cache.c osdep: Move memalign-related functions to their own header 2022-03-07 13:16:49 +00:00
qed-table.c qed: switch to *_co_* functions 2022-10-27 20:14:11 +02:00
qed.c block: bdrv_create_file is a coroutine_fn 2022-12-15 16:07:43 +01:00
qed.h
quorum.c qapi block: Elide redundant has_FOO in generated C 2022-12-14 20:03:25 +01:00
raw-format.c block: bdrv_create_file is a coroutine_fn 2022-12-15 16:07:43 +01:00
rbd.c qapi block: Elide redundant has_FOO in generated C 2022-12-14 20:03:25 +01:00
replication.c block: Drain individual nodes during reopen 2022-12-15 16:07:42 +01:00
reqlist.c block/reqlist: add reqlist_wait_all() 2022-03-07 09:33:30 +01:00
snapshot-access.c block: Manipulate bs->file / bs->backing pointers in .attach/.detach 2022-10-27 20:14:11 +02:00
snapshot.c block/snapshot: drop indirection around bdrv_snapshot_fallback_ptr 2022-10-27 20:14:11 +02:00
ssh.c qapi block: Elide redundant has_FOO in generated C 2022-12-14 20:03:25 +01:00
stream.c stream: Replace subtree drain with a single node drain 2022-12-15 16:07:42 +01:00
throttle-groups.c
throttle.c block: Revert .bdrv_drained_begin/end to non-coroutine_fn 2022-12-15 16:07:42 +01:00
trace-events nbd: trace long NBD operations 2022-06-29 10:57:02 +03:00
trace.h
vdi.c block: bdrv_create_file is a coroutine_fn 2022-12-15 16:07:43 +01:00
vhdx-endian.c
vhdx-log.c block: Change bdrv_{pread,pwrite,pwrite_sync}() param order 2022-07-12 12:14:55 +02:00
vhdx.c block: bdrv_create_file is a coroutine_fn 2022-12-15 16:07:43 +01:00
vhdx.h
vmdk.c block: bdrv_create_file is a coroutine_fn 2022-12-15 16:07:43 +01:00
vpc.c block: bdrv_create_file is a coroutine_fn 2022-12-15 16:07:43 +01:00
vvfat.c block/vvfat: Unify the mkdir() call 2022-10-31 20:37:58 +00:00
win32-aio.c osdep: Move memalign-related functions to their own header 2022-03-07 13:16:49 +00:00
write-threshold.c