]> git.proxmox.com Git - mirror_zfs.git/commit
zvol: Remove broken blk-mq optimization
authorTony Hutter <hutter2@llnl.gov>
Mon, 23 Oct 2023 21:45:06 +0000 (14:45 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 24 Oct 2023 21:37:52 +0000 (14:37 -0700)
commit7c9b6fed16ed5034fd1cdfdaedfad93dc97b1557
treecd7bc851cb8746be84186102f89ebe36f551d0b6
parent252f46be7d8f2a7480a99b671004c463311e28b0
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
include/os/linux/spl/sys/uio.h
module/os/linux/zfs/zfs_uio.c