NAS-134891 / 25.10 / linux: zvols: correctly detect flush requests (#17131) #280
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
since 4.10, bio->bi_opf needs to be checked to determine all kinds of flush requests. this was the case prior to the commit referenced below, but the order of ifdefs was not the usual one (newest up top), which might have caused this to slip through.
this fixes a regression when using zvols as Qemu block devices, but might have broken other use cases as well. the symptoms are that all sync writes from within a VM configured to use such a virtual block devices are ignored and treated as async writes by the host ZFS layer.
this can be verified using fio in sync mode inside the VM, for example with
fio
--filename=/dev/sda --ioengine=libaio --loops=1 --size=10G
--time_based --runtime=60 --group_reporting --stonewall --name=cc1
--description="CC1" --rw=write --bs=4k --direct=1 --iodepth=1
--numjobs=1 --sync=1
which shows an IOPS number way above what the physical device underneath supports, with "zpool iostat -r 1" on the hypervisor side showing no sync IO occuring during the benchmark.
with the regression fixed, both fio inside the VM and the IO stats on the host show the expected numbers.
Fixes: 846b598
"config: remove HAVE_REQ_OP_* and HAVE_REQ_*"
Reviewed-by: Alexander Motin [email protected]
Reviewed-by: Tony Hutter [email protected]
Motivation and Context
Description
How Has This Been Tested?
Types of changes
Checklist:
Signed-off-by
.