Linux NFS development
 help / color / mirror / Atom feed
From: Dai Ngo <dai.ngo@oracle.com>
To: chuck.lever@oracle.com, jlayton@kernel.org, neilb@ownmail.net,
	okorniev@redhat.com, tom@talpey.com, hch@lst.de
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH 0/3] NFSD: Prevent dupplicate SCSI fencing operation.
Date: Mon, 15 Dec 2025 10:13:32 -0800	[thread overview]
Message-ID: <20251215181418.2201035-1-dai.ngo@oracle.com> (raw)

This patchset implements a mechanism to avoid issuing redundant
SCSI client fencing operations for the same client and SCSI device:

Introduce a hash table per net namespace to store records of clients
that has been assigned persistent registration key to use for
accessing the SCSI block devices.

Each record contains the clientID, dev_t of the SCSI block device
and a flag to indicate whether the client was fenced.

When the server hands out the client registration key, it creates
a record with the fence flag set to False and inserts this record
into the hash table.
 
When a client needs to be fenced, the server looks up the client's
registration record and checks the fenced flag to see if the
fencing op needs to be issued.
 
When the client sends the GETDEVINFO for a new layout, the server
resets the fenced flag back to False.

When the client unmounts the share, all records belong to this
client are removed by __destroy_client.

All client records and the hash table are freed when the net
namespace is shutdown.

Dai Ngo (3):
NFSD: Move clientid_hashval and same_clid to header files
NFSD: Add infrastructure for tracking persistent SCSI registration keys
NFSD: Prevent redundant SCSI fencing operations

 fs/nfsd/blocklayout.c | 145 ++++++++++++++++++++++++++++++++++++++++++++-
 fs/nfsd/netns.h       |   2 +
 fs/nfsd/nfs4state.c   |  16 +----
 fs/nfsd/nfsd.h        |  19 ++++++
 fs/nfsd/nfssvc.c      |   9 ++-
 fs/nfsd/pnfs.h        |  11 ++++
 fs/nfsd/state.h       |   5 ++
 7 files changed, 189 insertions(+), 18 deletions(-)


             reply	other threads:[~2025-12-15 18:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-15 18:13 Dai Ngo [this message]
2025-12-15 18:13 ` [PATCH 1/3] NFSD: Move clientid_hashval and same_clid to header files Dai Ngo
2025-12-15 18:58   ` Chuck Lever
2025-12-15 20:50     ` Dai Ngo
2025-12-18  9:25     ` Christoph Hellwig
2025-12-18 19:40       ` Dai Ngo
2025-12-15 18:13 ` [PATCH 2/3] NFSD: Add infrastructure for tracking persistent SCSI registration keys Dai Ngo
2025-12-18  9:34   ` Christoph Hellwig
2025-12-18 16:00     ` Chuck Lever
2025-12-18 19:44       ` Dai Ngo
2025-12-19  5:24       ` Christoph Hellwig
2025-12-19 13:40         ` Chuck Lever
2025-12-18 19:40     ` Dai Ngo
2025-12-15 18:13 ` [PATCH 3/3] NFSD: Prevent redundant SCSI fencing operations Dai Ngo
2025-12-18  9:34   ` Christoph Hellwig
2025-12-18 19:41     ` Dai Ngo

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=20251215181418.2201035-1-dai.ngo@oracle.com \
    --to=dai.ngo@oracle.com \
    --cc=chuck.lever@oracle.com \
    --cc=hch@lst.de \
    --cc=jlayton@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@ownmail.net \
    --cc=okorniev@redhat.com \
    --cc=tom@talpey.com \
    /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