]> git.ipfire.org Git - thirdparty/qemu.git/commit
file-posix: Fix aio=threads performance regression after enablign FUA
authorKevin Wolf <kwolf@redhat.com>
Wed, 25 Jun 2025 08:50:19 +0000 (10:50 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 14 Jul 2025 15:12:35 +0000 (17:12 +0200)
commitd402da1360c2240e81f0e5fc80ddbfc6238e0da8
treeb7f914e65b8e846d221abc96d00cf815d42621c5
parent430e2be81e0970ee06c1c956f7698262b2ec514f
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: 984a32f17e8d ("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>
block/file-posix.c