HomeFreeBSD

zvol: Remove broken blk-mq optimization

Description

zvol: Remove broken blk-mq optimization

This fix removes a dubious optimization in zfs_uiomove_bvec_rq()
that saved the iterator contents of a rq_for_each_segment(). This
optimization allowed restoring the "saved state" from a previous
rq_for_each_segment() call on the same uio so that you wouldn't
need to iterate though each bvec on every zfs_uiomove_bvec_rq() call.
However, if the kernel is manipulating the requests/bios/bvecs under
the covers between zfs_uiomove_bvec_rq() calls, then it could result
in corruption from using the "saved state". This optimization
results in an unbootable system after installing an OS on a zvol
with blk-mq enabled.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #15351

Details

Provenance
Tony Hutter <hutter2@llnl.gov>Authored on Oct 23 2023, 9:45 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Oct 24 2023, 9:37 PM
Parents
rG252f46be7d8f: ZIL: Detect single-threaded workloads
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG7c9b6fed16ed: zvol: Remove broken blk-mq optimization (authored by Tony Hutter <hutter2@llnl.gov>).Oct 24 2023, 9:37 PM