Linux NFS development
 help / color / mirror / Atom feed
* [PATCH 0/3] nfsd: write verifier fixes and optimization
@ 2023-02-13 21:13 Jeff Layton
  2023-02-13 21:13 ` [PATCH 1/3] nfsd: copy the whole verifier in nfsd_copy_write_verifier Jeff Layton
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Jeff Layton @ 2023-02-13 21:13 UTC (permalink / raw)
  To: trond.myklebust, chuck.lever; +Cc: willy, linux-nfs

While looking at the recent problems with the fsync during nfsd_file
cleanup, it occured to me that we could greatly simplify and improve
the server's write verifier handling. I also noticed an existing bug
which is fixed in patch #1.

Instead of trying to check for errors via fsync and resetting the write
verifier when we get one, we can just fold the current value of the
inode's errseq_t into the hashed verifier that is generated at startup
time.

Testing this new scheme has been a real challenge. Once a writeback
error is recorded on all local filesystems, further attempts to write to
the inode return -EIO (and some filesystems even flip to r/o) and you
never see the new verifier.

Trond, you originally added the code to make it reset the verifier on a
writeback error. Do you have a good way to test that? Did you guys use
NFSv3 reexport for testing this somehow?

Jeff Layton (3):
  nfsd: copy the whole verifier in nfsd_copy_write_verifier
  errseq: add a new errseq_fetch helper
  nfsd: simplify write verifier handling

 fs/nfsd/filecache.c    | 22 +------------------
 fs/nfsd/netns.h        |  4 ----
 fs/nfsd/nfs4proc.c     | 17 ++++++---------
 fs/nfsd/nfsctl.c       |  1 -
 fs/nfsd/nfssvc.c       | 48 +++++++++++++-----------------------------
 fs/nfsd/trace.h        | 28 ------------------------
 fs/nfsd/vfs.c          | 28 +++++-------------------
 fs/nfsd/vfs.h          |  1 +
 include/linux/errseq.h |  1 +
 lib/errseq.c           | 33 ++++++++++++++++++++++++++++-
 10 files changed, 62 insertions(+), 121 deletions(-)

-- 
2.39.1


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

end of thread, other threads:[~2023-02-14 23:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-13 21:13 [PATCH 0/3] nfsd: write verifier fixes and optimization Jeff Layton
2023-02-13 21:13 ` [PATCH 1/3] nfsd: copy the whole verifier in nfsd_copy_write_verifier Jeff Layton
2023-02-13 21:13 ` [PATCH 2/3] errseq: add a new errseq_fetch helper Jeff Layton
2023-02-13 21:13 ` [PATCH 3/3] nfsd: simplify write verifier handling Jeff Layton
2023-02-14  0:49   ` Rick Macklem
2023-02-14  3:28     ` Trond Myklebust
2023-02-14 13:53       ` Jeff Layton
2023-02-14 14:58         ` Chuck Lever III
2023-02-14 15:01           ` Jeff Layton
2023-02-14 22:57         ` Rick Macklem
2023-02-14 23:16           ` Jeff Layton
2023-02-14 23:34           ` Trond Myklebust

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox