From: Chuck Lever <chuck.lever@oracle.com>
To: Petro Pavlov <petro.pavlov@vastdata.com>
Cc: Roi Azarzar <roi.azarzar@vastdata.com>, linux-nfs@vger.kernel.org
Subject: Re: Questions Regarding Delegation Claim Behavior
Date: Tue, 27 May 2025 09:22:34 -0400 [thread overview]
Message-ID: <a464374b-40a8-48d6-986c-ed83d1d81394@oracle.com> (raw)
In-Reply-To: <8b83e1ef-867b-4b4f-95b6-9dc03d6d591c@oracle.com>
On 5/27/25 8:58 AM, Chuck Lever wrote:
> On 5/26/25 7:10 AM, Petro Pavlov wrote:
>>
>> I believe the following section of the RFC may be relevant to the use of
>> a delegation |stateid| in relation to the file being accessed:
>>
>> If the stateid type is not valid for the context in which the
>> stateid appears, return NFS4ERR_BAD_STATEID. Note that a stateid may
>> be valid in general, as would be reported by the TEST_STATEID
>> operation, but be invalid for a particular operation, as, for
>> example, when a stateid that doesn't represent byte-range locks is
>> passed to the non-from_open case of LOCK or to LOCKU, or when a
>> stateid that does not represent an open is passed to CLOSE or
>> OPEN_DOWNGRADE. In such cases, the server MUST return
>> NFS4ERR_BAD_STATEID.
For the record, this is the sixth bullet point in the final paragraph of
Section 8.2.4 of RFC 8881.
Perhaps this text is applicable, but I have trouble with a compliance
statement that mandates specific on-the-wire behavior but does not have
an exhaustive list of cases where it applies. Such statements are not
supposed to be so hand-wavy.
And in any event, I prefer NFS4ERR_INVAL in such cases, as the stateid
is clearly valid. BAD_STATEID will most likely trigger the client to
perform state recovery, which is almost certain to cause the client to
simply resend the same request after determining that no state recovery
is needed. Lather, rinse, repeat.
But, a pynfs test case or two here is a good thing. The client is
misbehaving, and our CI isn't looking for this corner case. I hope you
are permitted to contribute your test cases to upstream pynfs.
--
Chuck Lever
next prev parent reply other threads:[~2025-05-27 13:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-22 15:51 Questions Regarding Delegation Claim Behavior Petro Pavlov
2025-05-23 14:40 ` Chuck Lever
2025-05-26 11:10 ` Petro Pavlov
2025-05-26 13:36 ` Rick Macklem
2025-05-26 14:55 ` Jeff Layton
2025-05-27 12:58 ` Chuck Lever
2025-05-27 13:22 ` Chuck Lever [this message]
[not found] ` <CAN5pLa66Fg0kWcwreggDP1btu=guC7ZgZrKX74sKSuej3mXwfQ@mail.gmail.com>
2025-06-08 15:57 ` Chuck Lever
2025-06-09 20:34 ` 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=a464374b-40a8-48d6-986c-ed83d1d81394@oracle.com \
--to=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=petro.pavlov@vastdata.com \
--cc=roi.azarzar@vastdata.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