From: Jeff Layton <jlayton@kernel.org>
To: Chuck Lever <cel@kernel.org>, NeilBrown <neil@brown.name>,
Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <dai.ngo@oracle.com>, Tom Talpey <tom@talpey.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH v3 00/34] Convert server-side NFSv3 XDR to use xdrgen
Date: Tue, 13 Oct 2026 12:42:38 -0400 [thread overview]
Message-ID: <4dec0a14a4ae2db8f042cbf305fac20802b2697f.camel@kernel.org> (raw)
In-Reply-To: <20261012220329.309998-1-cel@kernel.org>
On Mon, 2026-10-12 at 18:02 -0400, Chuck Lever wrote:
> Replace NFSD's NFSv3 XDR encoders and decoders with code that is
> mechanically generated directly from the NFSv3 RPC language
> specification. Unlike NFSv2, where there are at least two
> incomplete language specifications and much lore, nfs3.x here is
> based closely on RFC 1813.
>
> As we convert newer NFS versions to use xdrgen, I expect a reduction
> in human coding errors, improved spec compliance, quicker implement-
> ation of new protocol, and better memory safety for the more complex
> NFS procedures.
>
> Changes in v3:
> - Copy the SYMLINK target with nfsd_symlink_target(), moved into vfs.c.
> - Add a patch removing the now-unused svc_fill_symlink_pathname().
> - Reject a READDIRPLUS entry on its minimum size before the lookup.
> - Drop the pr_warn_once() for an unexpected file type in GETATTR.
> - Explain why a late readdir host error is not reported as the status.
> - Write "committed", not "on the wire", in the first-batch patch.
> - Link to v2: https://lore.kernel.org/linux-nfs/20260924171012.3978-1-cel@kernel.org/
>
> Changes in v2:
> - Include the generated NFSv3 header directly in nfsfh.c and nfsctl.c.
> - Remove the unused struct nfsd3_createargs in the MKDIR patch.
> - Regenerate the READDIR and READDIRPLUS result decoders.
> - Drop the decode-hook stubs the regenerated decoders no longer call.
> - Link to v1: https://lore.kernel.org/linux-nfs/20260923132811.244160-1-cel@kernel.org/
>
> Chuck Lever (34):
> NFSD: Report a first-batch readdir error in the reply status
> Documentation: Add the RPC language description of NFSv3
> NFSD: Add infrastructure for generating NFSv3 XDR encoders and
> decoders
> NFSD: Replace nfs3.h with nfs3xdr_gen.h
> NFSD: Replace the nfsd3_createres macro
> NFSD: Relocate the NFSv3 XDR storage union into nfs3proc.c
> NFSD: Use xdrgen XDR functions for the NFSv3 NULL procedure
> NFSD: Use xdrgen XDR functions for NFSv3 GETATTR procedure
> NFSD: Use xdrgen XDR functions for NFSv3 SETATTR procedure
> NFSD: Use xdrgen XDR functions for the NFSv3 LOOKUP procedure
> NFSD: Use xdrgen XDR functions for NFSv3 ACCESS procedure
> NFSD: Use xdrgen XDR functions for NFSv3 READLINK procedure
> NFSD: Use xdrgen XDR functions for NFSv3 READ procedure
> NFSD: Use xdrgen XDR functions for NFSv3 WRITE procedure
> NFSD: Use xdrgen XDR functions for NFSv3 CREATE procedure
> NFSD: Use xdrgen XDR functions for NFSv3 MKDIR procedure
> NFSD: Use xdrgen XDR functions for NFSv3 SYMLINK procedure
> NFSD: Use xdrgen XDR functions for NFSv3 MKNOD procedure
> NFSD: Use xdrgen XDR functions for the NFSv3 REMOVE procedure
> NFSD: Use xdrgen XDR functions for the NFSv3 RMDIR procedure
> NFSD: Use xdrgen XDR functions for the NFSv3 RENAME procedure
> NFSD: Use xdrgen XDR functions for the NFSv3 LINK procedure
> NFSD: Use xdrgen XDR functions for the NFSv3 FSSTAT procedure
> NFSD: Use xdrgen XDR functions for the NFSv3 FSINFO procedure
> NFSD: Use xdrgen XDR functions for the NFSv3 PATHCONF procedure
> NFSD: Use xdrgen XDR functions for the NFSv3 COMMIT procedure
> NFSD: Use xdrgen XDR functions for NFSv3 READDIR arguments
> NFSD: Use xdrgen XDR functions for NFSv3 READDIRPLUS arguments
> NFSD: Refactor NFSv3 directory cookie encoding
> NFSD: Refactor NFSv3 directory entry encoding
> NFSD: Split struct nfsd3_readdirres
> NFSD: Use xdrgen XDR functions for NFSv3 READDIR results
> NFSD: Use xdrgen XDR functions for NFSv3 READDIRPLUS results
> SUNRPC: Remove svc_fill_symlink_pathname()
>
> Documentation/sunrpc/xdr/nfs3.x | 839 ++++++
> fs/nfsd/Makefile | 15 +-
> fs/nfsd/nfs2acl.c | 41 +-
> fs/nfsd/nfs3acl.c | 12 +-
> fs/nfsd/nfs3proc.c | 2541 +++++++++++++------
> fs/nfsd/nfs3xdr.c | 1374 +++-------
> fs/nfsd/nfs3xdr_gen.c | 3808 ++++++++++++++++++++++++++++
> fs/nfsd/nfs3xdr_gen.h | 82 +
> fs/nfsd/nfsctl.c | 2 +-
> fs/nfsd/nfserr.h | 2 +-
> fs/nfsd/nfsfh.c | 2 +-
> fs/nfsd/nfsproc.c | 22 -
> fs/nfsd/vfs.c | 105 +-
> fs/nfsd/vfs.h | 1 +
> fs/nfsd/xdr3.h | 300 +--
> include/linux/nfs3.h | 3 -
> include/linux/sunrpc/svc.h | 3 -
> include/linux/sunrpc/xdrgen/nfs3.h | 1092 ++++++++
> net/sunrpc/svc.c | 50 -
> 19 files changed, 8052 insertions(+), 2242 deletions(-)
> create mode 100644 Documentation/sunrpc/xdr/nfs3.x
> create mode 100644 fs/nfsd/nfs3xdr_gen.c
> create mode 100644 fs/nfsd/nfs3xdr_gen.h
> create mode 100644 include/linux/sunrpc/xdrgen/nfs3.h
I skimmed over the changes. They all look fairly straightforward and I
definitely support moving toward machine-generated code for this sort
of thing.
Acked-by: Jeff Layton <jlayton@kernel.org>
prev parent reply other threads:[~2026-10-13 16:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-12 22:02 [PATCH v3 00/34] Convert server-side NFSv3 XDR to use xdrgen Chuck Lever
2026-10-12 22:02 ` [PATCH v3 01/34] NFSD: Report a first-batch readdir error in the reply status Chuck Lever
2026-10-13 16:42 ` Jeff Layton [this message]
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=4dec0a14a4ae2db8f042cbf305fac20802b2697f.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=cel@kernel.org \
--cc=dai.ngo@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=neil@brown.name \
--cc=okorniev@redhat.com \
--cc=tom@talpey.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.