linux-yocto/include
Mike Snitzer a97bf1a0cd nfs/localio: avoid issuing misaligned IO using O_DIRECT
[ Upstream commit 25ba2b84c3 ]

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: 3feec68563 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-10-15 12:04:13 +02:00
..
acpi ACPICA: Apply ACPI_NONSTRING 2025-10-15 12:03:33 +02:00
asm-generic once: fix race by moving DO_ONCE to separate section 2025-10-15 12:03:37 +02:00
clocksource
crypto crypto: comp - Use same definition of context alloc and free ops 2025-10-15 12:04:04 +02:00
cxl
drm drm/panel: Allow powering on panel follower after panel is enabled 2025-10-15 12:03:46 +02:00
dt-bindings Pin control changes for v6.17 2025-08-02 12:07:09 -07:00
hyperv
keys
kunit
kvm KVM: arm64: vgic-v3: Erase LPIs from xarray outside of raw spinlocks 2025-09-10 02:56:20 -07:00
linux nfs/localio: avoid issuing misaligned IO using O_DIRECT 2025-10-15 12:04:13 +02:00
math-emu
media
memory
misc
net bonding: fix xfrm offload feature setup on active-backup mode 2025-10-15 12:04:13 +02:00
pcmcia pcmcia: remove PCCARD_IODYN 2025-08-16 15:37:47 +02:00
ras
rdma
rv
scsi scsi: libsas: Add dev_parent_is_expander() helper 2025-10-15 12:03:43 +02:00
soc This is the usual collection of primarily clk driver updates. The big part of 2025-07-31 13:36:27 -07:00
sound More minor SDCA bug fixes 2025-09-04 19:31:51 +01:00
target
trace NFSD: filecache: add STATX_DIOALIGN and STATX_DIO_READ_ALIGN support 2025-10-15 12:04:13 +02:00
uapi HID: hidraw: tighten ioctl command parsing 2025-10-15 12:04:00 +02:00
ufs scsi: ufs: core: Fix data race in CPU latency PM QoS request handling 2025-10-15 12:04:08 +02:00
vdso vdso: Add struct __kernel_old_timeval forward declaration to gettime.h 2025-10-15 12:03:25 +02:00
video
xen Significant patch series in this pull request: 2025-08-03 16:23:09 -07:00
Kbuild