Skip to content

lockd: fix races that can result in stuck filelocks

Jeff Layton linux-nfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7lockd: purge resources held on behalf of nlm clients when shutting downfs/lockd/host.c+1 -00 replies
2/7lockd: remove 2 unused helper functionsinclude/linux/lockd/lockd.h+0 -100 replies
3/7lockd: move struct nlm_wait to lockd.hfs/lockd/clntlock.c include/linux/lockd/lockd.h+10 -130 replies
4/7lockd: fix races in client GRANTED_MSG wait logicfs/lockd/clntlock.c fs/lockd/clntproc.c include/linux/lockd/lockd.h+44 -340 replies
5/7lockd: server should unlock lock if client rejects the grantfs/lockd/svclock.c+17 -40 replies
6/7nfs: move nfs_fhandle_hash to common include filefs/nfs/internal.h include/linux/nfs.h+20 -150 replies
7/7lockd: add some client-side tracepointsfs/lockd/Makefile fs/lockd/clntlock.c fs/lockd/clntproc.c +2 more+108 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/7] lockd: fix races that can result in stuck filelocks

I sent the first patch in this series the other day, but didn't get any responses. Since then I've had time to follow up on the client-side part of this problem, which eventually also pointed out yet another bug on the server side. There are also a couple of cleanup patches in here too, and a patch to add some tracepoints that I found useful while diagnosing this.

With this set on both client and server, I'm now able to run Yongcheng's test for an hour straight with no stuck locks.

Jeff Layton (7):
lockd: purge resources held on behalf of nlm clients when shutting
down
lockd: remove 2 unused helper functions
lockd: move struct nlm_wait to lockd.h
lockd: fix races in client GRANTED_MSG wait logic
lockd: server should unlock lock if client rejects the grant
nfs: move nfs_fhandle_hash to common include file
lockd: add some client-side tracepoints

 fs/lockd/Makefile           |  6 ++-
 fs/lockd/clntlock.c         | 58 +++++++++++---------------
 fs/lockd/clntproc.c         | 42 ++++++++++++++-----
 fs/lockd/host.c             |  1 +
 fs/lockd/svclock.c          | 21 ++++++++--
 fs/lockd/trace.c            |  3 ++
 fs/lockd/trace.h            | 83 +++++++++++++++++++++++++++++++++++++
 fs/nfs/internal.h           | 15 -------
 include/linux/lockd/lockd.h | 29 ++++++-------
 include/linux/nfs.h         | 20 +++++++++
 10 files changed, 200 insertions(+), 78 deletions(-)
 create mode 100644 fs/lockd/trace.c
 create mode 100644 fs/lockd/trace.h
Signature · 1 line
2.39.2