public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Jan Kara <jack@suse.cz>, Chuck Lever <cel@kernel.org>
Cc: NeilBrown <neil@brown.name>, Amir Goldstein <amir73il@gmail.com>,
	 Christian Brauner	 <brauner@kernel.org>,
	Jan Kara <jack@suse.com>,
	Olga Kornievskaia	 <okorniev@redhat.com>,
	Dai Ngo <dai.ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
		linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Chuck Lever	 <chuck.lever@oracle.com>
Subject: Re: [PATCH v3 1/3] fs: add umount notifier chain for filesystem unmount notification
Date: Mon, 02 Mar 2026 12:10:52 -0500	[thread overview]
Message-ID: <74db1cb73ef8571e2e38187b668a83d28e19933b.camel@kernel.org> (raw)
In-Reply-To: <3r5imygq5ah4khza5fsbgam6ss6ohla24p4ikmbpfpjoj4qmns@f6bw344w4axz>

On Mon, 2026-03-02 at 16:26 +0100, Jan Kara wrote:
> On Mon 02-03-26 08:57:28, Chuck Lever wrote:
> > On 3/1/26 11:09 PM, NeilBrown wrote:
> > > On Mon, 02 Mar 2026, Chuck Lever wrote:
> > > > On Sun, Mar 1, 2026, at 1:09 PM, Amir Goldstein wrote:
> > > > > On Sun, Mar 1, 2026 at 6:21 PM Chuck Lever <cel@kernel.org> wrote:
> > > > > > Perhaps that description nails down too much implementation detail,
> > > > > > and it might be stale. A broader description is this user story:
> > > > > > 
> > > > > > "As a system administrator, I'd like to be able to unexport an NFSD
> > > > > 
> > > > > Doesn't "unexporting" involve communicating to nfsd?
> > > > > Meaning calling to svc_export_put() to path_put() the
> > > > > share root path?
> > > > > 
> > > > > > share that is being accessed by NFSv4 clients, and then unmount it,
> > > > > > reliably (for example, via automation). Currently the umount step
> > > > > > hangs if there are still outstanding delegations granted to the NFSv4
> > > > > > clients."
> > > > > 
> > > > > Can't svc_export_put() be the trigger for nfsd to release all resources
> > > > > associated with this share?
> > > > 
> > > > Currently unexport does not revoke NFSv4 state. So, that would
> > > > be a user-visible behavior change. I suggested that approach a
> > > > few months ago to linux-nfs@ and there was push-back.
> > > > 
> > > 
> > > Could we add a "-F" or similar flag to "exportfs -u" which implements the
> > > desired semantic?  i.e.  asking nfsd to release all locks and close all
> > > state on the filesystem.
> > 
> > That meets my needs, but should be passed by the linux-nfs@ review
> > committee.
> > 
> > -F could probably just use the existing "unlock filesystem" API
> > after it does the unexport.
> 
> If this option flies, then I guess it is the most sensible variant. If it
> doesn't work for some reason, then something like ->umount_begin sb
> callback could be twisted (may possibly need some extension) to provide
> the needed notification? At least in my naive understanding it was created
> for usecases like this...
> 
> 								Honza

umount_begin is a superblock op that only occurs when MNT_FORCE is set.
In this case though, we really want something that calls back into
nfsd, rather than to the fs being unmounted.

You could just wire up a bunch of umount_begin() operations but that
seems rather nasty. Maybe you could add some sort of callback that nfsd
could register that runs just before umount_begin does?

That would be preferable from a UI standpoint than dealing with a new
exportfs option, IMO. MNT_FORCE could then (in theory) properly allow
for state teardown in nfsd that way, which seems rather natural.
-- 
Jeff Layton <jlayton@kernel.org>

  reply	other threads:[~2026-03-02 17:10 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-24 16:39 [PATCH v3 0/3] Automatic NFSv4 state revocation on filesystem unmount Chuck Lever
2026-02-24 16:39 ` [PATCH v3 1/3] fs: add umount notifier chain for filesystem unmount notification Chuck Lever
2026-02-26  8:48   ` Christian Brauner
2026-02-26 10:52     ` Amir Goldstein
2026-02-26 13:27       ` Chuck Lever
2026-02-26 13:32         ` Jan Kara
2026-02-27 15:10           ` Chuck Lever
2026-03-01 14:37             ` Amir Goldstein
2026-03-01 17:20               ` Chuck Lever
2026-03-01 18:09                 ` Amir Goldstein
2026-03-01 18:19                   ` Chuck Lever
2026-03-02  4:09                     ` NeilBrown
2026-03-02 13:57                       ` Chuck Lever
2026-03-02 15:26                         ` Jan Kara
2026-03-02 17:10                           ` Jeff Layton [this message]
2026-03-02 17:37                             ` Jan Kara
2026-03-02 17:53                               ` Jeff Layton
2026-03-04 13:17                                 ` Christian Brauner
2026-03-04 15:15                                   ` Chuck Lever
2026-03-02 20:46                               ` NeilBrown
2026-03-02 17:01                         ` Chuck Lever
2026-03-02 20:36                           ` NeilBrown
2026-03-03 20:02                             ` Chuck Lever
2026-03-03 21:23                               ` NeilBrown
2026-03-03 22:50                                 ` Chuck Lever
2026-03-04  1:01                                   ` NeilBrown
2026-03-04 13:05                             ` Christian Brauner
2026-02-24 16:39 ` [PATCH v3 2/3] nfsd: revoke NFSv4 state when filesystem is unmounted Chuck Lever
2026-02-24 16:39 ` [PATCH v3 3/3] nfsd: close cached files on filesystem unmount Chuck Lever
2026-02-24 17:14 ` [PATCH v3 0/3] Automatic NFSv4 state revocation " Al Viro

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=74db1cb73ef8571e2e38187b668a83d28e19933b.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=amir73il@gmail.com \
    --cc=brauner@kernel.org \
    --cc=cel@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=dai.ngo@oracle.com \
    --cc=jack@suse.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neil@brown.name \
    --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