Skip to content

Convert server-side NFSv3 XDR to use xdrgen

Chuck Lever linux-nfs 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest1 of 34 patches 1 replyIn review
  2. v233 patches 0 repliesSuperseded
  3. v133 patches 0 repliesSuperseded

Changes in v3 from the cover letter

- 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/[email protected]/

1 of 34 patches is in this archive. The cover letter announces 34.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/34NFSD: Report a first-batch readdir error in the reply statusfs/nfsd/vfs.c+50 -260 replies

Reviews trailers per patch

The patch has no Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJeff Layton
SeriesA-b
1/34

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 00/34] Convert server-side NFSv3 XDR to use xdrgen

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/[email protected]/

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/[email protected]/

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
Signature · 1 line
2.55.0