Linux NFS development
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@hammerspace.com>
To: Anna Schumaker <anna@kernel.org>
Cc: Trond Myklebust <trondmy@kernel.org>, linux-nfs@vger.kernel.org
Subject: [PATCH] nfs/localio: remove the localio_O_DIRECT_semantics documentation
Date: Wed, 11 Nov 2026 18:01:33 -0500	[thread overview]
Message-ID: <20261111230133.65304-1-snitzer@kernel.org> (raw)

Commit 25ba2b84c38f ("nfs/localio: avoid issuing misaligned IO using
O_DIRECT") removed the localio_O_DIRECT_semantics module parameter.
LOCALIO now issues an application's O_DIRECT to the underlying local
filesystem.  It issues IO that is not DIO-aligned as buffered IO, so
that misaligned IO does not fail.  But localio.rst still documents the
parameter, in its description of how the client issues IO and in its
list of module parameters.

Remove the parameter from both places, and say what LOCALIO does with
O_DIRECT now.

Fixes: 25ba2b84c38f ("nfs/localio: avoid issuing misaligned IO using O_DIRECT")
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
---
 Documentation/filesystems/nfs/localio.rst | 24 ++++-------------------
 1 file changed, 4 insertions(+), 20 deletions(-)

diff --git a/Documentation/filesystems/nfs/localio.rst b/Documentation/filesystems/nfs/localio.rst
index 45c6981da0d89..9f1eb2a3c2db6 100644
--- a/Documentation/filesystems/nfs/localio.rst
+++ b/Documentation/filesystems/nfs/localio.rst
@@ -272,21 +272,10 @@ is issuing IO to the underlying local filesystem that it is sharing with
 the NFS server. See: fs/nfs/localio.c:nfs_local_doio() and
 fs/nfs/localio.c:nfs_local_commit().
 
-With normal NFS that makes use of RPC to issue IO to the server, if an
-application uses O_DIRECT the NFS client will bypass the pagecache but
-the NFS server will not. The NFS server's use of buffered IO affords
-applications to be less precise with their alignment when issuing IO to
-the NFS client. But if all applications properly align their IO, LOCALIO
-can be configured to use end-to-end O_DIRECT semantics from the NFS
-client to the underlying local filesystem, that it is sharing with
-the NFS server, by setting the 'localio_O_DIRECT_semantics' nfs module
-parameter to Y, e.g.:
-
-    echo Y > /sys/module/nfs/parameters/localio_O_DIRECT_semantics
-
-Once enabled, it will cause LOCALIO to use end-to-end O_DIRECT semantics
-(but again, this may cause IO to fail if applications do not properly
-align their IO).
+With LOCALIO, an application's O_DIRECT extends down to the underlying
+local filesystem. LOCALIO issues DIO-aligned IO as O_DIRECT. It issues
+IO that is not DIO-aligned as buffered IO, so misaligned application IO
+does not fail.
 
 Security
 ========
@@ -325,11 +314,6 @@ LOCALIO.  The mount's timeouts do not apply to the probe.  Set to 0, the
 probe uses the mount's timeouts instead, as an NFS RPC would.  A change
 applies to the next probe.
 
-/sys/module/nfs/parameters/localio_O_DIRECT_semantics (bool)
-controls if O_DIRECT extends down to the underlying filesystem, defaults
-to N. Application IO must be logical blocksize aligned, otherwise
-O_DIRECT will fail.
-
 /sys/module/nfsv3/parameters/nfs3_localio_probe_throttle (uint)
 controls if NFSv3 read and write IOs will trigger (re)enabling of
 LOCALIO every N (nfs3_localio_probe_throttle) IOs, defaults to 0

base-commit: 5e810a57a1cf2fc785d89e711ff40f1112f6404c
-- 
2.52.0


                 reply	other threads:[~2026-11-11 23:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261111230133.65304-1-snitzer@kernel.org \
    --to=snitzer@hammerspace.com \
    --cc=anna@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trondmy@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox