NFSD: Decouple the write path from NFSv3 XDR constants
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | NFS: Move definition of enum nfs3_stable_howinclude/ include/ include/ | +9 | 0 replies | |
| 2/2 | NFSD: Replace nfsd_write()'s "stable" argument with "iocb_flags"fs/ fs/ fs/ +6 more | +57 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] NFSD: Decouple the write path from NFSv3 XDR constants
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(-)
Signature · 1 line
2.54.0