Skip to content

NLM fl_pid fixup

Benjamin Coddington linux-nfs 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 2 repliesIn review
  2. v15 patches 0 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5lockd: prepare nlm_lockowner for use by the serverfs/lockd/clntproc.c+11 -100 replies
2/5lockd: Convert NLM service fl_owner to nlm_lockownerfs/lockd/svc4proc.c fs/lockd/svclock.c fs/lockd/svcproc.c +4 more+123 -50 replies
3/5lockd: Remove lm_compare_owner and lm_owner_keyfs/lockd/svclock.c+0 -180 replies
4/5lockd: Show pid of lockd for remote locksfs/lockd/svc4proc.c fs/lockd/svclock.c fs/lockd/svcproc.c +2 more+4 -60 replies
5/5locks: Cleanup lm_compare_owner and lm_owner_keyDocumentation/filesystems/Locking fs/locks.c include/linux/fs.h+0 -210 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/5] NLM fl_pid fixup

This series aims to correct the fl_pid value for locks held by the NLM server, or lockd. It applies onto the revert of the previous attempt to fix this problem sent ealier this week: '[PATCH] Revert "lockd: Show pid of lockd for remote locks"'.

The problem with the earlier attempt was that we discarded the svid, and so we couldn't distinguish remote lockowners on each host. It is necessary to turn the svid and host into a distinct owner.

We can take a page from the NLM client and make an allocation to track the svid and host together, which is what we do here. The mechanisms to do so aren't quite similar enough to generalize, but I did share the nlm_lockowner structure. There is one field unsed on the server: nlm_lockowner.owner.

It turns out that the LTP's testcases/network/nfsv4/locks/locktests.c was useful for testing this, as it coordinates locking tests amongst NFS clients.

Changes on:
v2 - Fixed typos in commit log messages, and whitespace.

Benjamin Coddington (5):
lockd: prepare nlm_lockowner for use by the server
lockd: Convert NLM service fl_owner to nlm_lockowner
lockd: Remove lm_compare_owner and lm_owner_key
lockd: Show pid of lockd for remote locks
locks: Cleanup lm_compare_owner and lm_owner_key

 Documentation/filesystems/Locking |  14 ----
 fs/lockd/clntproc.c               |  21 +++---
 fs/lockd/svc4proc.c               |  14 +++-
 fs/lockd/svclock.c                | 118 +++++++++++++++++++++++++-----
 fs/lockd/svcproc.c                |  14 +++-
 fs/lockd/svcsubs.c                |   2 +-
 fs/lockd/xdr.c                    |   3 -
 fs/lockd/xdr4.c                   |   3 -
 fs/locks.c                        |   5 --
 include/linux/fs.h                |   2 -
 include/linux/lockd/lockd.h       |   2 +
 11 files changed, 138 insertions(+), 60 deletions(-)
Signature · 1 line
2.20.1