HomeFreeBSD

Linux 5.10 compat: restore custom uio_prefaultpages()

Description

Linux 5.10 compat: restore custom uio_prefaultpages()

As part of commit 1c2358c1 the custom uio_prefaultpages() code
was removed in favor of using the generic kernel provided
iov_iter_fault_in_readable() interface. Unfortunately, it
turns out that up until the Linux 4.7 kernel the function would
only ever fault in the first iovec of the iov_iter. The result
being uiomove_iov() may hang waiting for the page.

This commit effectively restores the custom uio_prefaultpages()
pages code for Linux 4.9 and earlier kernels which contain the
troublesome version of iov_iter_fault_in_readable().

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #11463
Closes #11484

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Jan 21 2021, 6:43 PM
GitHub <noreply@github.com>Committed on Jan 21 2021, 6:43 PM
Parents
rGd0cd9a5cc65e: Extending FreeBSD UIO Struct
Branches
Unknown
Tags
Unknown