summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorChuck Lever <cel@kernel.org>2026-09-16 12:28:38 -0400
committerChuck Lever <cel@kernel.org>2026-10-11 23:12:22 -0400
commit48e8a88b89aa56674fff36d1b61ca27f45268091 (patch)
treef38682b246e0e6bc9c760497666669ab6b531e8b /tools/lib/python
parent8fdb99934823411544732276e43723189b32a331 (diff)
downloadlinux-next-48e8a88b89aa56674fff36d1b61ca27f45268091.tar.gz
linux-next-48e8a88b89aa56674fff36d1b61ca27f45268091.zip
NFSD: Use xdrgen XDR functions for NFSv2 GETATTR procedure
Replace the NFSPROC_GETATTR entry in the nfsd_procedures2 array with an entry that dispatches the xdrgen-generated nfs_svc_decode_fhandle and nfs_svc_encode_attrstat. Wrapper structures bridge the generated xdrgen types and the legacy svc_fh and kstat representations the NFSD VFS layer still uses. A few helper functions are introduced which will be used here and in subsequent patches. The pc_argzero field is now set to zero for the NFSv2 GETATTR procedure. The xdrgen decoders are trusted to initialize all arguments in the argp->xdrgen field, making the early defensive memset unnecessary. The remaining argp fields are cleared as needed. This refactor replaces the use of svcxdr_encode_fattr(), so the reference to the file handle can be released directly by nfsd_proc_getattr(). A separate ->pc_release callback is thus no longer needed. This makes it straightforward to confirm that the file handle is properly released during every error flow. The new nfsd_mode_to_ftype() utility no longer maps socket and FIFO devices to non-standard values: NFSOCK=6 which is outside the ftype enum, and NFCHR for FIFOs which is semantically wrong. The Linux NFS client implementation does not seem to use or depend on these non-standard values. The new utility function returns NFNON for both, which is the RFC-compliant behavior. Acked-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20260916162859.2051-10-cel@kernel.org Signed-off-by: Chuck Lever <cel@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions