linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dai Ngo <dai.ngo@oracle.com>
To: Benjamin Coddington <bcodding@redhat.com>
Cc: chuck.lever@oracle.com, jlayton@kernel.org, neilb@suse.de,
	okorniev@redhat.com, tom@talpey.com, hch@infradead.org,
	linux-nfs@vger.kernel.org
Subject: Re: [PATCH 1/1] NFSD: Fix SCSI reservation conflict causing pNFS client to revert I/O to MDS
Date: Tue, 30 Sep 2025 14:41:29 -0700	[thread overview]
Message-ID: <ddcea773-3d9a-47d0-b857-087655b2ec13@oracle.com> (raw)
In-Reply-To: <475D1227-CB10-461D-9EC1-A303B74A701E@redhat.com>

Hi Ben,

On 9/30/25 12:15 PM, Benjamin Coddington wrote:
> Hi Dai,
>
> On 30 Sep 2025, at 12:28, Dai Ngo wrote:
>
>> When servicing the GETDEVICEINFO call from an NFS client, the NFS server
>> creates a SCSI persistent reservation on the target device using the
>> reservation type PR_EXCLUSIVE_ACCESS_REG_ONLY. This setting restricts
>> device access so that only hosts registered with a reservation key can
>> perform read or write operations. Any unregistered initiator is completely
>> blocked, including standard SCSI commands such as READCAPACITY.
> SBC-4, table 13 shows that READ CAPACITY should be allowed from any I_T
> nexus, no matter the state of the reservation on the LU.
>
> Is it possible that your SCSI implementation might be out of the spec?  Also
> possible that SBC-4 has been updated, I haven't been following the SCSI
> specification updates..
>
> Ben

I don't have access to SBC-4 spec, t10.org does not allow guest access
to their docs. Can you please share the content of table 13 here?

I found the "SCSI Commands Reference Manual" from Seagate. Below is
a description of the reservation type, apologize for the format due to
copy & paste from the doc. Based on this table, code 6h (Exclusive
Access - Registrant only) seems to state media-access commands (I assume
READ_CAPACITY is included) are only allowed for registered I_T nexuses.

I'll continue to research for the official definition of the Reservation
type.

Thanks,
-Dai



----------------------------------------------------------------------------------------------------------


Table 82 Persistent reservation type codes


Code Name Description

0h Obsolete


1h

Write

Exclusive

Access Restrictions: Some commands (e.g., media-access write commands) 
are only

allowed for the persistent reservation holder (see SPC-5).

Persistent Reservation Holder: There is only one persistent reservation 
holder.


2h Obsolete


3h

Exclusive

Access

Access Restrictions: Some commands (e.g., media-access commands) are 
only allowed for

the persistent reservation holder (see SPC-5).

Persistent Reservation Holder: There is only one persistent reservation 
holder.


4h Obsolete


5h

Write Exclusive –

Registrants

Only

Access Restrictions: Some commands (e.g., media-access write commands) 
are only

allowed for registered I_T nexuses.

Persistent Reservation Holder: There is only one persistent reservation 
holder (see SPC-5).


6h

Exclusive Access –

Registrants

Only

Access Restrictions: Some commands (e.g., media-access commands) are 
only allowed for

registered I_T nexuses.

Persistent Reservation Holder: There is only one persistent reservation 
holder (see SPC-5).


7h

Write Exclusive –

All

Registrants

Access Restrictions: Some commands (e.g., media-access write commands) 
are only

allowed for registered I_T nexuses.

Persistent Reservation Holder: Each registered I_T nexus is a persistent 
reservation holder

(see SPC-5).


8h

Exclusive Access –

All

Registrants

Access Restrictions: Some commands (e.g., media-access commands) are 
only allowed for

registered I_T nexuses.

Persistent Reservation Holder: Each registered I_T nexus is a persistent 
reservation holder

(see SPC-5).


9h - Fh Reserved



  reply	other threads:[~2025-09-30 21:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-30 16:28 [PATCH 1/1] NFSD: Fix SCSI reservation conflict causing pNFS client to revert I/O to MDS Dai Ngo
2025-09-30 19:15 ` Benjamin Coddington
2025-09-30 21:41   ` Dai Ngo [this message]
2025-10-01 10:54     ` Benjamin Coddington
2025-10-01 17:36       ` Dai Ngo
2025-10-03  6:45         ` Christoph Hellwig
2025-10-07 16:49           ` Dai Ngo
2025-10-07 15:59         ` Dai Ngo
2025-10-07 20:37           ` Benjamin Coddington
2025-10-09 17:43             ` Dai Ngo
2025-10-09 19:46               ` Benjamin Coddington
2025-10-09 20:20                 ` 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=ddcea773-3d9a-47d0-b857-087655b2ec13@oracle.com \
    --to=dai.ngo@oracle.com \
    --cc=bcodding@redhat.com \
    --cc=chuck.lever@oracle.com \
    --cc=hch@infradead.org \
    --cc=jlayton@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --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;
as well as URLs for NNTP newsgroup(s).