You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qemu/block
Kevin Wolf d402da1360 file-posix: Fix aio=threads performance regression after enablign FUA
For aio=threads, we're currently not implementing REQ_FUA in any useful
way, but just do a separate raw_co_flush_to_disk() call. This changes
behaviour compared to the old state, which used bdrv_co_flush() with its
optimisations. As a quick fix, call bdrv_co_flush() again like before.
Eventually, we can use pwritev2() to make use of RWF_DSYNC if available,
but we'll still have to keep this code path as a fallback, so this fix
is required either way.

While the fix itself is a one-liner, some new graph locking annotations
are needed to convince TSA that the locking is correct.

Cc: qemu-stable@nongnu.org
Fixes: 984a32f17e ("file-posix: Support FUA writes")
Buglink: https://issues.redhat.com/browse/RHEL-96854
Reported-by: Tingting Mao <timao@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20250625085019.27735-1-kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
4 weeks ago
..
export block/export: Add option to allow export of inactive nodes 6 months ago
monitor block: mark blk_remove_bs() as GRAPH_UNLOCKED 4 weeks ago
accounting.c include: Rename sysemu/ -> system/ 8 months ago
aio_task.c block: Remove unused aio_task_pool_empty 11 months ago
amend.c block: Mark BlockDriver callbacks for amend job GRAPH_RDLOCK 2 years ago
backup.c block: add bdrv_graph_wrlock_drained() convenience wrapper 4 weeks ago
blkdebug.c block: Expand block status mode from bool to flags 3 months ago
blkio.c include/system: Move exec/memory.h to system/memory.h 4 months ago
blklogwrites.c block: add bdrv_graph_wrlock_drained() convenience wrapper 4 weeks ago
blkreplay.c include: Rename sysemu/ -> system/ 8 months ago
blkverify.c block: add bdrv_graph_wrlock_drained() convenience wrapper 4 weeks ago
block-backend.c block: add bdrv_graph_wrlock_drained() convenience wrapper 4 weeks ago
block-copy.c include: Rename sysemu/ -> system/ 8 months ago
block-gen.h block-coroutine-wrapper.py: support also basic return types 3 years ago
block-ram-registrar.c include: Rename sysemu/ -> system/ 8 months ago
bochs.c block: Take graph lock for most of .bdrv_open 2 years ago
cloop.c block: Take graph lock for most of .bdrv_open 2 years ago
commit.c block/commit: mark commit_abort() as GRAPH_UNLOCKED 4 weeks ago
copy-before-write.c block: Expand block status mode from bool to flags 3 months ago
copy-before-write.h blockdev-backup: Add error handling option for copy-before-write jobs 3 months ago
copy-on-read.c qapi: Move include/qapi/qmp/ to include/qobject/ 6 months ago
copy-on-read.h block: Mark bdrv_(un)freeze_backing_chain() and callers GRAPH_RDLOCK 2 years ago
coroutines.h block: Expand block status mode from bool to flags 3 months ago
create.c qemu/compiler: Absorb 'clang-tsa.h' 5 months ago
crypto.c include: Rename sysemu/ -> system/ 8 months ago
crypto.h block: Support detached LUKS header creation using qemu-img 2 years ago
curl.c qapi: Move include/qapi/qmp/ to include/qobject/ 6 months ago
dirty-bitmap.c block: Mark bdrv_*_dirty_bitmap() and callers GRAPH_RDLOCK 2 years ago
dmg-bz2.c Include qemu-common.h exactly where needed 6 years ago
dmg-lzfse.c block/dmg: Ignore C99 prototype declaration mismatch from <lzfse.h> 2 years ago
dmg.c block: Protect bs->file with graph_lock 2 years ago
dmg.h block/dmg: Declare a type definition for DMG uncompress function 2 years ago
file-posix.c file-posix: Fix aio=threads performance regression after enablign FUA 4 weeks ago
file-win32.c qapi: Move include/qapi/qmp/ to include/qobject/ 6 months ago
filter-compress.c block: Take graph lock for most of .bdrv_open 2 years ago
gluster.c file-posix, gluster: Handle zero block status hint better 3 months ago
graph-lock.c block: add bdrv_graph_wrlock_drained() convenience wrapper 4 weeks ago
io.c block: never use atomics to access bs->quiesce_counter 4 weeks ago
io_uring.c file-posix: Support FUA writes 5 months ago
iscsi-opts.c modules: add block module annotations 4 years ago
iscsi.c block: Expand block status mode from bool to flags 3 months ago
linux-aio.c block: skip automatic zero-init of large array in ioq_submit 2 months ago
meson.build include: Rename sysemu/ -> system/ 8 months ago
mirror.c block: drop wrapper for bdrv_set_backing_hd_drained() 4 weeks ago
nbd.c block: Expand block status mode from bool to flags 3 months ago
nfs.c qapi: Move include/qapi/qmp/ to include/qobject/ 6 months ago
null.c block: Expand block status mode from bool to flags 3 months ago
nvme.c block/nvme: Use host PCI MMIO API 3 months ago
parallels-ext.c qapi/crypto: Rename QCryptoHashAlgorithm to *Algo, and drop prefix 11 months ago
parallels.c block: Expand block status mode from bool to flags 3 months ago
parallels.h block: Protect bs->file with graph_lock 2 years ago
preallocate.c block: Protect bs->file with graph_lock 2 years ago
progress_meter.c coroutine: Clean up superfluous inclusion of qemu/lockable.h 3 years ago
qapi-system.c qapi: Move include/qapi/qmp/ to include/qobject/ 6 months ago
qapi.c block/qapi: make @node-name in @BlockDeviceInfo non-optional 4 weeks ago
qcow.c block: Expand block status mode from bool to flags 3 months ago
qcow2-bitmap.c block/qcow2-bitmap: Replace g_memdup() by g_memdup2() 1 year ago
qcow2-cache.c qcow2: Mark qcow2_signal_corruption() and callers GRAPH_RDLOCK 2 years ago
qcow2-cluster.c qcow2: Take locks for accessing bs->file 2 years ago
qcow2-refcount.c qcow2: Mark qcow2_signal_corruption() and callers GRAPH_RDLOCK 2 years ago
qcow2-snapshot.c include: Rename sysemu/ -> system/ 8 months ago
qcow2-threads.c thread-pool: avoid passing the pool parameter every time 2 years ago
qcow2.c block: add bdrv_graph_wrlock_drained() convenience wrapper 4 weeks ago
qcow2.h qcow2: Take locks for accessing bs->file 2 years ago
qed-check.c qed: mark more functions as coroutine_fns and GRAPH_RDLOCK 2 years ago
qed-cluster.c qed: protect table cache with CoMutex 8 years ago
qed-l2-cache.c osdep: Move memalign-related functions to their own header 3 years ago
qed-table.c block: use bdrv_co_debug_event in coroutine context 2 years ago
qed.c block: Expand block status mode from bool to flags 3 months ago
qed.h block: Protect bs->file with graph_lock 2 years ago
quorum.c block: add bdrv_graph_wrlock_drained() convenience wrapper 4 weeks ago
raw-format.c block: Expand block status mode from bool to flags 3 months ago
rbd.c block: Expand block status mode from bool to flags 3 months ago
replication.c block: mark bdrv_reopen_queue() and bdrv_reopen_multiple() as GRAPH_UNLOCKED 4 weeks ago
reqlist.c block/reqlist: allow adding overlapping requests 11 months ago
snapshot-access.c block: Expand block status mode from bool to flags 3 months ago
snapshot.c block: add bdrv_graph_wrlock_drained() convenience wrapper 4 weeks ago
ssh.c qapi: Move include/qapi/qmp/ to include/qobject/ 6 months ago
stream.c block/stream: mark stream_prepare() as GRAPH_UNLOCKED 4 weeks ago
throttle-groups.c qom: Make InterfaceInfo[] uses const 4 months ago
throttle.c block: Take graph lock for most of .bdrv_open 2 years ago
trace-events nbd/client: Accept 64-bit block status chunks 2 years ago
trace.h trace: switch position of headers to what Meson requires 5 years ago
vdi.c block: Expand block status mode from bool to flags 3 months ago
vhdx-endian.c Include qemu-common.h exactly where needed 6 years ago
vhdx-log.c vhdx: Take locks for accessing bs->file 2 years ago
vhdx.c qapi: Move include/qapi/qmp/ to include/qobject/ 6 months ago
vhdx.h vhdx: Take locks for accessing bs->file 2 years ago
vmdk.c block: mark bdrv_open_child_common() and its callers GRAPH_UNLOCKED 4 weeks ago
vpc.c block: Expand block status mode from bool to flags 3 months ago
vvfat.c block: Expand block status mode from bool to flags 3 months ago
win32-aio.c aio: remove aio_disable_external() API 2 years ago
write-threshold.c block: remove AioContext locking 2 years ago