Linux NFS development
 help / color / mirror / Atom feed
From: Dai Ngo <dai.ngo@oracle.com>
To: Chuck Lever <chuck.lever@oracle.com>,
	Jeff Layton <jlayton@kernel.org>, Neil Brown <neilb@suse.de>,
	Olga Kornievskaia <okorniev@redhat.com>,
	Tom Talpey <tom@talpey.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: NFSD automatically releases all states when underlying file system is unmounted
Date: Wed, 19 Mar 2025 11:22:00 -0700	[thread overview]
Message-ID: <543f93fd-3b5a-4e4a-b2b0-0a1b7e1e8361@oracle.com> (raw)

Hi,

Currently when the local file system needs to be unmounted for maintenance
the admin needs to make sure all the NFS clients have stopped using any files
on the NFS shares before the umount(8) can succeed.

In an environment where there are thousands of clients this manual process
seems almost impossible or impractical. The only option available now is to
restart the NFS server which would works since the NFS client can recover its
state but it seems like this is a big hammer approach.

Ideally, when the umount command is run there is a callback from the VFS layer
to notify the upper protocols; NFS and SMB, to release its states on this file
system for the umount to complete.

Is there any existing mechanism to allow NFSD to release its states automatically
on unmount?

Unmount is not a frequent operation. Is it justifiable to add a bunch of complex
code for something is not frequently needed?

I appreciate any opinions on this issue.

Thanks,
-Dai




   


             reply	other threads:[~2025-03-19 18:22 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-19 18:22 Dai Ngo [this message]
2025-03-19 18:28 ` NFSD automatically releases all states when underlying file system is unmounted Chuck Lever
2025-03-19 19:00   ` Dai Ngo
2025-03-19 19:24     ` Chuck Lever
2025-03-19 19:44       ` Dai Ngo
2025-03-19 21:46 ` NeilBrown
2025-03-19 22:12   ` Dai Ngo
2025-03-20 17:53   ` Chuck Lever
2025-03-21 14:36     ` Benjamin Coddington
2025-03-21 14:43       ` Jeff Layton
2025-03-21 15:07         ` Benjamin Coddington
2025-03-21 15:18           ` Chuck Lever
2025-03-21 15:51             ` Benjamin Coddington
2025-03-21 14:44       ` Chuck Lever
2025-03-26  0:23         ` NeilBrown
2025-03-26  3:20           ` Dai Ngo
2025-03-26  3:41             ` NeilBrown
2025-03-26 13:15               ` Chuck Lever
2025-03-27 22:47                 ` NeilBrown
2025-04-09 21:00               ` 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=543f93fd-3b5a-4e4a-b2b0-0a1b7e1e8361@oracle.com \
    --to=dai.ngo@oracle.com \
    --cc=chuck.lever@oracle.com \
    --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