]> git.ipfire.org Git - thirdparty/qemu.git/commit
block/io: Ignore FUA with cache.no-flush=on
authorKevin Wolf <kwolf@redhat.com>
Fri, 7 Mar 2025 22:16:31 +0000 (23:16 +0100)
committerKevin Wolf <kwolf@redhat.com>
Thu, 13 Mar 2025 16:57:23 +0000 (17:57 +0100)
commit2f3b6e61f692bade441230dd25c1c0f101bd2eef
tree63283cfcb67474a2b057f5255aaf2592372362b9
parent984a32f17e8dab0dc3d2328c46cb3e0c0a472a73
block/io: Ignore FUA with cache.no-flush=on

For block drivers that don't advertise FUA support, we already call
bdrv_co_flush(), which considers BDRV_O_NO_FLUSH. However, drivers that
do support FUA still see the FUA flag with BDRV_O_NO_FLUSH and get the
associated performance penalty that cache.no-flush=on was supposed to
avoid.

Clear FUA for write requests if BDRV_O_NO_FLUSH is set.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20250307221634.71951-3-kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/io.c