From: Jeff Layton <jlayton@kernel.org>
To: Benjamin Coddington <bcodding@redhat.com>
Cc: Trond Myklebust <trondmy@kernel.org>,
Anna Schumaker <anna@kernel.org>,
linux-nfs@vger.kernel.org
Subject: Re: [PATCH 2/2] NFSv4: Allow FREE_STATEID to clean up delegations
Date: Wed, 23 Apr 2025 16:37:40 -0400 [thread overview]
Message-ID: <6fe721ba67cc176f8c9befd13249b08e6b83c704.camel@kernel.org> (raw)
In-Reply-To: <FF36159B-E39E-4391-9955-394249FF27F6@redhat.com>
On Wed, 2025-04-23 at 15:59 -0400, Benjamin Coddington wrote:
> On 23 Apr 2025, at 15:41, Jeff Layton wrote:
>
> > On Wed, 2025-04-23 at 13:59 -0400, Benjamin Coddington wrote:
> > > @@ -10612,6 +10610,7 @@ static int nfs41_free_stateid(struct nfs_server *server,
> > > if (IS_ERR(task))
> > > return PTR_ERR(task);
> > > rpc_put_task(task);
> > > + stateid->type = NFS4_FREED_STATEID_TYPE;
> >
> > Would it be possible to call nfs_delegation_mark_returned() at this
> > point, and skip all of the type changing?
>
> It won't because we can be here with a lock stateid or open
> stateid.
>
Ok, I can see why you decided to do it this way, and since we already
have a REVOKED and INVALID types, adding FREED doesn't seem that bad.
If you do go this route, then I think you also need to add the FREED
case to the switch in nfs41_test_and_free_expired_stateid().
--
Jeff Layton <jlayton@kernel.org>
next prev parent reply other threads:[~2025-04-23 20:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 17:59 [PATCH 0/2] Allow FREE_STATEID to free delegations Benjamin Coddington
2025-04-23 17:59 ` [PATCH 1/2] NFSv4: Ensure test_and_free_stateid callers use private memory Benjamin Coddington
2025-04-23 20:35 ` Jeff Layton
2025-04-23 22:04 ` Benjamin Coddington
2025-04-29 14:01 ` Benjamin Coddington
2025-04-23 17:59 ` [PATCH 2/2] NFSv4: Allow FREE_STATEID to clean up delegations Benjamin Coddington
2025-04-23 19:41 ` Jeff Layton
2025-04-23 19:59 ` Benjamin Coddington
2025-04-23 20:37 ` Jeff Layton [this message]
2025-04-23 22:12 ` 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=6fe721ba67cc176f8c9befd13249b08e6b83c704.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=anna@kernel.org \
--cc=bcodding@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trondmy@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