From: Jeff Layton <jlayton@kernel.org>
To: Chuck Lever <cel@kernel.org>
Cc: NeilBrown <neil@brown.name>,
Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
Trond Myklebust <trondmy@kernel.org>,
Anna Schumaker <anna@kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>,
Mike Snitzer <snitzer@kernel.org>,
Donald Hunter <donald.hunter@gmail.com>,
Jakub Kicinski <kuba@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Steve Dickson <steved@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-nfs@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH 2/6] NFSD: Apply per-export I/O modes to READ and WRITE
Date: Tue, 27 Oct 2026 13:59:41 -0400 [thread overview]
Message-ID: <31238159b7a4753e0a10c9f8b9fdecc4b92fb2f5.camel@kernel.org> (raw)
In-Reply-To: <ad5ac019-34ac-4c7f-8b90-cde8a0dc0546@slotpi15m67>
On Tue, 2026-10-27 at 13:54 -0400, Chuck Lever wrote:
> On 10/27/26 12:45 PM, Jeff Layton wrote:
> > Resolve each export's effective I/O mode (explicit setting, else the
> > global io_cache_read/write knob) in nfsd_iter_read and nfsd_vfs_write,
> > and skip splice for reads on exports whose effective read mode is not
> > buffered. Update the debugfs knob comments to match.
>
> [ ... ]
>
> > - if (file->f_op->splice_read && nfsd_read_splice_ok(rqstp))
> > + if (file->f_op->splice_read && nfsd_read_splice_ok(rqstp) &&
> > + nfsd_read_iomode(fhp->fh_export) == NFSD_IO_BUFFERED)
> > err = nfsd_splice_read(rqstp, fhp, file, offset, count, eof);
>
> nfsd_io_cache_read_set() still sets nfsd_disable_splice_read whenever
> the global knob is switched to dontcache or direct, so
> nfsd_read_splice_ok() returns false before this per-export test is
> reached. An export pinned to riomode=buffered on such a server never
> gets splice; it falls through to nfsd_iter_read() and does vector
> buffered reads. The same applies to the splice_ok decisions in
> nfsd4_encode_read() and nfsd4_encode_read_plus_data().
>
> Patch 3/6 says an explicit per-export setting pins that export's
> IO mode "regardless of the global knob", and that isn't quite true
> now for the buffered case.
>
> I need to think carefully about the interaction between the "disable
> splice" setting, which is global, and the per-export I/O setting.
>
Maybe disable_splice should be an export option of its own? It seems
like that should be doable.
> Separately, on the names of the export options: "riomode" and
> "wiomode" are hard to read, and "mode" might suggest "permission bits"
> to an administrator. How about read_io= and write_io= instead? They
> follow the underscore style of the other multi-word export options
> (no_subtree_check, root_squash, security_label) and read naturally:
>
> /srv/data client(rw,read_io=direct,write_io=dontcache)
>
> The values buffered, dontcache, and direct then carry the meaning
> without "cache" or "mode" in the name.
>
> The name appears in the exports syntax, the nfsd.export/content
> output, the netlink YAML spec, and the forthcoming nfs-utils series,
> so it's worth settling before v2 and before the nfs-utils side gets
> merged.
>
Ok, I'll look at renaming them. Thanks for the initial review!
--
Jeff Layton <jlayton@kernel.org>
next prev parent reply other threads:[~2026-10-27 17:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 16:45 [PATCH 0/6] nfsd: add new export options for controlling read/write iomode Jeff Layton
2026-10-27 16:45 ` [PATCH 1/6] NFSD: Add per-export read/write I/O mode settings Jeff Layton
2026-10-27 16:45 ` [PATCH 2/6] NFSD: Apply per-export I/O modes to READ and WRITE Jeff Layton
2026-10-27 17:54 ` Chuck Lever
2026-10-27 17:59 ` Jeff Layton [this message]
2026-10-27 19:42 ` Chuck Lever
2026-10-27 16:45 ` [PATCH 3/6] NFSD: Document per-export riomode= and wiomode= options Jeff Layton
2026-10-27 16:45 ` [PATCH 4/6] NFSD: Keep per-export statistics across export cache updates Jeff Layton
2026-10-27 16:45 ` [PATCH 5/6] NFSD: Count the storage reads of each export's READs Jeff Layton
2026-10-27 16:45 ` [PATCH 6/6] NFSD: Document how to choose an IO mode Jeff Layton
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=31238159b7a4753e0a10c9f8b9fdecc4b92fb2f5.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=Dai.Ngo@oracle.com \
--cc=anna@kernel.org \
--cc=cel@kernel.org \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neil@brown.name \
--cc=netdev@vger.kernel.org \
--cc=okorniev@redhat.com \
--cc=pabeni@redhat.com \
--cc=rdunlap@infradead.org \
--cc=skhan@linuxfoundation.org \
--cc=snitzer@kernel.org \
--cc=steved@redhat.com \
--cc=tom@talpey.com \
--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
all inboxes | Powered by JetHome®