From: bfields@fieldses.org (J. Bruce Fields)
To: NeilBrown <neilb@suse.de>
Cc: Chuck Lever <chuck.lever@oracle.com>, linux-nfs@vger.kernel.org
Subject: Re: [RFC PATCH 0/4] nfsd: allow NFSv4 state to be revoked.
Date: Thu, 27 Jan 2022 15:06:38 -0500 [thread overview]
Message-ID: <20220127200638.GB3459@fieldses.org> (raw)
In-Reply-To: <164325908579.23133.4781039121536248752.stgit@noble.brown>
On Thu, Jan 27, 2022 at 03:58:10PM +1100, NeilBrown wrote:
> If a filesystem is exported to a client with NFSv4 and that client holds
> a file open, the filesystem cannot be unmounted without either stopping the
> NFS server completely, or blocking all access from that client
> (unexporting all filesystems) and waiting for the lease timeout.
>
> For NFSv3 - and particularly NLM - it is possible to revoke all state by
> writing the path to the filesystem into /proc/fs/nfsd/unlock_filesystem.
>
> This series extends this functionality to NFSv4. With this, to unmount
> an exported filesystem is it sufficient to disable export of that
> filesystem, and then write the path to unlock_filesystem.
It's always been weird that /proc/fs/nfsd/unlock_filesystem was v3-only,
so thanks for looking into extending it to v4.
You can accomplish the same by stopping the server, unexporting, then
restarting, but then applications may see grace-period-length delays.
So in a way this is just an optimization for what's probably a rare
operation. Probably worth it, but I'd still be curious if there's any
specific motivating cases you can share.
I guess the procedure would be to unexport and then write to
/proc/fs/nfsd/unlock_filesystem? An option to exportfs to do both might
be handy.
> I've cursed mainly on NFSv4.1
It does inspire strong feelings sometimes.
--b.
> and later for this. I haven't tested
> yet with NFSv4.0 which has different mechanisms for state management.
>
> If this series is seen as a general acceptable approach, I'll look into
> the NFSv4.0 aspects properly and make sure it works there.
>
> Thanks,
> NeilBrown
>
>
> ---
>
> NeilBrown (4):
> nfsd: prepare for supporting admin-revocation of state
> nfsd: allow open state ids to be revoked and then freed
> nfsd: allow lock state ids to be revoked and then freed
> nfsd: allow delegation state ids to be revoked and then freed
>
>
> fs/nfsd/nfs4state.c | 105 ++++++++++++++++++++++++++++++++++++++++----
> 1 file changed, 96 insertions(+), 9 deletions(-)
>
> --
> Signature
prev parent reply other threads:[~2022-01-27 20:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-27 4:58 [RFC PATCH 0/4] nfsd: allow NFSv4 state to be revoked NeilBrown
2022-01-27 4:58 ` [PATCH 3/4] nfsd: allow lock state ids to be revoked and then freed NeilBrown
2022-01-27 4:58 ` [PATCH 2/4] nfsd: allow open " NeilBrown
2022-01-27 4:58 ` [PATCH 1/4] nfsd: prepare for supporting admin-revocation of state NeilBrown
2022-01-27 12:59 ` kernel test robot
2022-01-27 14:51 ` kernel test robot
2022-01-27 4:58 ` [PATCH 4/4] nfsd: allow delegation state ids to be revoked and then freed NeilBrown
2022-01-27 17:00 ` [RFC PATCH 0/4] nfsd: allow NFSv4 state to be revoked Chuck Lever III
2022-01-27 22:41 ` NeilBrown
2022-01-27 23:15 ` dai.ngo
2022-01-28 0:07 ` Chuck Lever III
2022-01-28 4:24 ` NeilBrown
2022-01-28 4:35 ` Trond Myklebust
2022-01-28 13:46 ` Chuck Lever III
2022-01-28 15:03 ` J. Bruce Fields
2022-01-28 2:51 ` J. Bruce Fields
2022-01-28 4:14 ` NeilBrown
2022-01-28 13:38 ` J. Bruce Fields
2022-01-28 16:23 ` J. Bruce Fields
2022-01-27 20:06 ` J. Bruce Fields [this message]
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=20220127200638.GB3459@fieldses.org \
--to=bfields@fieldses.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
/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