reexport lock fixes v2
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest8 patches 0 repliesNew
Changes since v1 from the cover letter
- Use ENOGRACE instead of returning NFS-specific error from vfs lock method.
- Take write opens for write locks in the NLM case (as we always have in the NFSv4 case).
- Don't block NLM threads waiting for blocking locks.
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | lockd: lockd server-side shouldn't set fl_opsfs/ | +12 | 0 replies | |
| 2/8 | nlm: minor nlm_lookup_file argument changefs/ fs/ fs/ +1 more | +10 | 0 replies | |
| 3/8 | nlm: minor refactoringfs/ fs/ | +10 | 0 replies | |
| 4/8 | lockd: update nlm_lookup_file reexport commentfs/ | +3 | 0 replies | |
| 5/8 | Keep read and write fds with each nlm_filefs/ fs/ fs/ +4 more | +121 | 0 replies | |
| 6/8 | nfs: don't atempt blocking locks on nfs reexportsfs/ fs/ include/ | +9 | 0 replies | |
| 7/8 | lockd: don't attempt blocking locks on nfs reexportsfs/ | +10 | 0 replies | |
| 8/8 | nfs: don't allow reexport reclaimsfs/ fs/ fs/ +2 more | +9 | 0 replies |
Reviews trailers per patch
None of the 8 patches has a Reviewed-by or Acked-by.
| Patch | Daire Byrne |
|---|---|
| 1/8 | T-b |
| 2/8 | |
| 3/8 | |
| 4/8 | |
| 5/8 | |
| 6/8 | |
| 7/8 | |
| 8/8 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/8] reexport lock fixes v2
From: "J. Bruce Fields" <[email protected]>
The following fix up some problems that can cause crashes or silently broken lock guarantees in the reexport case.
Not fixed:
- Attempts to reclaim locks after a reboot of the reexport server will fail. This at least seems like an improvement over the current situation, which is that they'll succeed even in cases where they shouldn't. Complete support for reboot recovery is a bigger job.
- NFSv4.1+ lock nofications don't work. So, clients have to poll as they do with NFSv4.0, which is suboptimal, but correct (and an improvement over the current situation, which is a kernel oops).
So what we have at this point is a suboptimal lock implementation that doesn't support lock recovery.
Another alternative might be to turn off file locking entirely in the re-export case. I'd rather take the incremental improvement and fix the oopses.
Changes since v1:
- Use ENOGRACE instead of returning NFS-specific error from vfs lock method.
- Take write opens for write locks in the NLM case (as we always have in the NFSv4 case).
- Don't block NLM threads waiting for blocking locks.
With those changes I'm passing connecthon tests for NFSv3-4.2 reexports of an NFSv4.0 filesystem.
--b.
J. Bruce Fields (8):
lockd: lockd server-side shouldn't set fl_ops
nlm: minor nlm_lookup_file argument change
nlm: minor refactoring
lockd: update nlm_lookup_file reexport comment Keep read and write fds with each nlm_file
nfs: don't atempt blocking locks on nfs reexports
lockd: don't attempt blocking locks on nfs reexports
nfs: don't allow reexport reclaims
fs/lockd/svc4proc.c | 6 +- fs/lockd/svclock.c | 80 +++++++++++++---------- fs/lockd/svcproc.c | 6 +- fs/lockd/svcsubs.c | 125 +++++++++++++++++++++++++----------- fs/nfs/export.c | 2 +- fs/nfs/file.c | 3 + fs/nfsd/lockd.c | 8 ++- fs/nfsd/nfs4state.c | 11 +++- fs/nfsd/nfsproc.c | 1 + include/linux/errno.h | 1 + include/linux/exportfs.h | 2 + include/linux/fs.h | 1 + include/linux/lockd/bind.h | 3 +- include/linux/lockd/lockd.h | 13 ++-- 14 files changed, 177 insertions(+), 85 deletions(-)
Signature · 1 line
2.31.1