diff options
| author | 2025-09-19 10:36:26 -0400 | |
|---|---|---|
| committer | 2025-09-30 16:10:29 -0400 | |
| commit | 25ba2b84c38f624151a3ba36e56d41c39b9223ad (patch) | |
| tree | cb30dcbb56b7a41bd95ce618bbd94292800e9ada /scripts/lib/kdoc/kdoc_parser.py | |
| parent | nfs/localio: make trace_nfs_local_open_fh more useful (diff) | |
| download | wireguard-linux-25ba2b84c38f624151a3ba36e56d41c39b9223ad.tar.xz wireguard-linux-25ba2b84c38f624151a3ba36e56d41c39b9223ad.zip | |
nfs/localio: avoid issuing misaligned IO using O_DIRECT
Add nfsd_file_dio_alignment and use it to avoid issuing misaligned IO
using O_DIRECT. Any misaligned DIO falls back to using buffered IO.
Because misaligned DIO is now handled safely, remove the nfs modparam
'localio_O_DIRECT_semantics' that was added to require users opt-in to
the requirement that all O_DIRECT be properly DIO-aligned.
Also, introduce nfs_iov_iter_aligned_bvec() which is a variant of
iov_iter_aligned_bvec() that also verifies the offset associated with
an iov_iter is DIO-aligned. NOTE: in a parallel effort,
iov_iter_aligned_bvec() is being removed along with
iov_iter_is_aligned().
Lastly, add pr_info_ratelimited if underlying filesystem returns
-EINVAL because it was made to try O_DIRECT for IO that is not
DIO-aligned (shouldn't happen, so its best to be louder if it does).
Fixes: 3feec68563d ("nfs/localio: add direct IO enablement with sync and async IO support")
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
0 files changed, 0 insertions, 0 deletions
