Re: [PATCH 0/9] Start reorganizing fs/nfsd/nfsd.h

Jeff Layton <[email protected]> Thu, 16 Jul 2026 09:35:57 -0400
Newsgroups gmane.linux.nfs
Message-ID <[email protected]>
On Sun, 2026-07-12 at 16:45 -0400, Chuck Lever wrote:
> fs/nfsd/nfsd.h has become a kitchen sink of unrelated declarations
> and definitions, including a broad swathe of headers and other
> detritus in NFSD source files. This organization introduces
> brittleness that makes it difficult to execute changes that cut
> across layers and internal modules that might otherwise be cleanly
> siloed. It also pulls in unused items into each TU, making
> compilation of nfsd.ko needlessly slower and more computationally-
> expensive.
> 
> This series begins sorting through this pile to relocate items that
> are obviously better placed in NFS version- or task-specific
> headers.
> 
> Chuck Lever (9):
>   NFSD: Make "stats.h" self-contained
>   NFSD: Explicitly include "stats.h"
>   NFSD: include "netns.h"
>   NFSD: Remove '#include "nfsd.h"' from fs/nfsd/cache.h
>   NFSD: Move the export.h include from nfsd.h to auth.c
>   NFSD: Move struct readdir_cd
>   NFSD: Relocate nfsd_user_namespace()
>   NFSD: Relocate nfsd4_set_netaddr()
>   NFSD: Relocate NFSv4 "supported attributes" to new header
> 
>  fs/nfsd/attr4.h     | 162 +++++++++++++++++++++++++++++++++++
>  fs/nfsd/auth.c      |  19 +++++
>  fs/nfsd/auth.h      |   6 ++
>  fs/nfsd/cache.h     |   3 +-
>  fs/nfsd/nfs4idmap.c |   1 +
>  fs/nfsd/nfs4proc.c  |  32 +++++++
>  fs/nfsd/nfs4state.c |   1 +
>  fs/nfsd/nfs4xdr.c   |   2 +
>  fs/nfsd/nfscache.c  |   2 +
>  fs/nfsd/nfsctl.c    |   2 +
>  fs/nfsd/nfsd.h      | 202 +-------------------------------------------
>  fs/nfsd/nfsfh.c     |   2 +
>  fs/nfsd/nfsxdr.c    |   2 +
>  fs/nfsd/state.h     |   3 +
>  fs/nfsd/stats.c     |   2 +
>  fs/nfsd/stats.h     |   3 +
>  fs/nfsd/trace.h     |   1 +
>  fs/nfsd/vfs.c       |   2 +
>  fs/nfsd/vfs.h       |   5 +-
>  fs/nfsd/xdr.h       |   1 +
>  fs/nfsd/xdr3.h      |   1 +
>  fs/nfsd/xdr4.h      |   2 +-
>  22 files changed, 253 insertions(+), 203 deletions(-)
>  create mode 100644 fs/nfsd/attr4.h

This all looks sane.

Reviewed-by: Jeff Layton <[email protected]>