Linux NFS development
 help / color / mirror / Atom feed
* [PATCH v3 00/34] Convert server-side NFSv3 XDR to use xdrgen
@ 2026-10-12 22:02 Chuck Lever
  2026-10-12 22:02 ` [PATCH v3 01/34] NFSD: Report a first-batch readdir error in the reply status Chuck Lever
  0 siblings, 1 reply; 2+ messages in thread
From: Chuck Lever @ 2026-10-12 22:02 UTC (permalink / raw)
  To: NeilBrown, Jeff Layton, Olga Kornievskaia, Dai Ngo, Tom Talpey; +Cc: linux-nfs

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

-- 
2.55.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-12 22:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox