public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Coddington <bcodding@redhat.com>
To: "J . Bruce Fields" <bfields@redhat.com>, jlayton@kernel.org
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH 0/5] NLM fl_pid fixup
Date: Thu, 23 May 2019 10:28:36 -0400	[thread overview]
Message-ID: <cover.1558620385.git.bcodding@redhat.com> (raw)

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.

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(-)

-- 
2.20.1


             reply	other threads:[~2019-05-23 14:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23 14:28 Benjamin Coddington [this message]
2019-05-23 14:28 ` [PATCH 1/5] lockd: prepare nlm_lockowner for use by the server Benjamin Coddington
2019-05-23 14:28 ` [PATCH 2/5] lockd: Convert NLM service fl_owner to nlm_lockowner Benjamin Coddington
2019-05-23 14:28 ` [PATCH 3/5] lockd: Remove lm_compare_owner and lm_owner_key Benjamin Coddington
2019-05-23 14:28 ` [PATCH 4/5] lockd: Show pid of lockd for remote locks Benjamin Coddington
2019-05-23 14:28 ` [PATCH 5/5] locks: Cleanup lm_compare_owner and lm_owner_key Benjamin Coddington

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1558620385.git.bcodding@redhat.com \
    --to=bcodding@redhat.com \
    --cc=bfields@redhat.com \
    --cc=jlayton@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox