Linux NFS development
 help / color / mirror / Atom feed
* [PATCH 0/3] NFSD: Prevent dupplicate SCSI fencing operation.
@ 2025-12-15 18:13 Dai Ngo
  2025-12-15 18:13 ` [PATCH 1/3] NFSD: Move clientid_hashval and same_clid to header files Dai Ngo
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Dai Ngo @ 2025-12-15 18:13 UTC (permalink / raw)
  To: chuck.lever, jlayton, neilb, okorniev, tom, hch; +Cc: linux-nfs

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


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2025-12-19 13:41 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-15 18:13 [PATCH 0/3] NFSD: Prevent dupplicate SCSI fencing operation Dai Ngo
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox