mbox series

[v2,0/3] Wait for DELEGRETURN before returning NFS4ERR_DELAY

Message ID 165953688893.1658.15242150042289528147.stgit@manet.1015granger.net (mailing list archive)
Headers show
Series Wait for DELEGRETURN before returning NFS4ERR_DELAY | expand

Message

Chuck Lever Aug. 3, 2022, 2:37 p.m. UTC
This RFC series adds logic to the Linux NFS server to make it wait a
few moments for clients to return a delegation before replying with
NFS4ERR_DELAY. There are two main benefits:

- This improves responsiveness when a delegated file is accessed
  from another client
- This removes an unnecessary latency if a client has neglected to
  return a delegation before attempting a RENAME or SETATTR

This series is incomplete:
- There are likely other operations that can benefit (eg. OPEN)
- The wait is a fixed 30ms delay; it would be better if the server
  could match an incoming CB_RECALL reply with waiters so they can
  proceed immediately, but I am still figuring out how that can be
  done

Changes since RFC:
- Eliminate spurious console messages on the server
- Wait for DELEGRETURN for RENAME operations
- Add CB done tracepoints
- Rework the retry loop

---

Chuck Lever (3):
      NFSD: Add tracepoints to report NFSv4 callback completions
      NFSD: Make nfsd4_setattr() wait before returning NFS4ERR_DELAY
      NFSD: Make nfsd4_rename() wait before returning NFS4ERR_DELAY


 fs/nfsd/nfs4layouts.c |  2 +-
 fs/nfsd/nfs4proc.c    | 52 ++++++++++++++++++++++++++++++--------
 fs/nfsd/nfs4state.c   | 21 ++++++++++++++++
 fs/nfsd/nfsd.h        |  1 +
 fs/nfsd/trace.h       | 58 +++++++++++++++++++++++++++++++++++++++++++
 fs/nfsd/xdr4.h        |  2 ++
 6 files changed, 124 insertions(+), 12 deletions(-)

--
Chuck Lever