All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] NFSD: Decouple the write path from NFSv3 XDR constants
@ 2026-07-23 18:20 Chuck Lever
  2026-07-23 18:20 ` [PATCH 1/2] NFS: Move definition of enum nfs3_stable_how Chuck Lever
  2026-07-23 18:20 ` [PATCH 2/2] NFSD: Replace nfsd_write()'s "stable" argument with "iocb_flags" Chuck Lever
  0 siblings, 2 replies; 3+ messages in thread
From: Chuck Lever @ 2026-07-23 18:20 UTC (permalink / raw)
  To: NeilBrown, Jeff Layton, Olga Kornievskaia, Dai Ngo, Tom Talpey; +Cc: linux-nfs

NFSD's internal write helpers are meant to be NFS-version-agnostic,
yet nfsd_write() has taken an NFSv3 stable_how value lifted straight
off the wire, and the NFSv4 WRITE and COPY paths borrow those same
NFSv3 constants for their own stable values, correct only because
stable_how and stable_how4 happen to share numeric values. That
coincidence is the debt: it binds version-neutral VFS helpers to one
protocol version's XDR and leaves NFSv4 depending on nfs3.h.

To remove the API's dependence on version-specific wire protocol,
change the generic VFS helpers to take IOCB flags instead of a
stable_how value. This removes a dependency on the nfs3.h header
in code that is not related to NFSv3.

Chuck Lever (2):
  NFS: Move definition of enum nfs3_stable_how
  NFSD: Replace nfsd_write()'s "stable" argument with "iocb_flags"

 fs/nfsd/nfs3proc.c       | 17 ++++++++++++++++-
 fs/nfsd/nfs3xdr.c        |  2 ++
 fs/nfsd/nfs4proc.c       | 18 ++++++++++++++++--
 fs/nfsd/nfs4xdr.c        |  2 +-
 fs/nfsd/nfsproc.c        |  2 +-
 fs/nfsd/vfs.c            | 30 ++++++++++--------------------
 fs/nfsd/vfs.h            |  6 ++++--
 fs/nfsd/xdr3.h           |  2 +-
 include/linux/nfs.h      |  9 ---------
 include/linux/nfs3.h     |  8 ++++++++
 include/linux/nfs4.h     |  6 ++++++
 include/trace/misc/nfs.h |  1 +
 12 files changed, 66 insertions(+), 37 deletions(-)

-- 
2.54.0


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

end of thread, other threads:[~2026-07-23 18:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-23 18:20 [PATCH 0/2] NFSD: Decouple the write path from NFSv3 XDR constants Chuck Lever
2026-07-23 18:20 ` [PATCH 1/2] NFS: Move definition of enum nfs3_stable_how Chuck Lever
2026-07-23 18:20 ` [PATCH 2/2] NFSD: Replace nfsd_write()'s "stable" argument with "iocb_flags" Chuck Lever

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.