From: Al Viro <viro@zeniv.linux.org.uk>
To: Steve French <smfrench@gmail.com>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
CIFS <linux-cifs@vger.kernel.org>
Subject: Re: Why do very few filesystems have umount helpers
Date: Mon, 29 Jul 2024 01:01:24 +0100 [thread overview]
Message-ID: <20240729000124.GH99483@ZenIV> (raw)
In-Reply-To: <CAH2r5ms+vyNND3XPkBo+HYEj3-YMSwqZJup8BSt2B3LYOgPF+A@mail.gmail.com>
On Sun, Jul 28, 2024 at 02:09:14PM -0500, Steve French wrote:
> Since umount does not notify the filesystem on unmount until
> references are closed (unless you do "umount --force") and therefore
> the filesystem is only notified at kill_sb time, an easier approach to
> fixing some of the problems where resources are kept around too long
> (e.g. cached handles or directory entries etc. or references on the
> mount are held) may be to add a mount helper which notifies the fs
> (e.g. via fs specific ioctl) when umount has begun. That may be an
> easier solution that adding a VFS call to notify the fs when umount
> begins.
Huh?
"references on the mount being held" is not something any userland
helpers have a chance to help with.
What exactly gets leaked in your tests? And what would that userland
helper do when umount happens due to the last process in given namespace
getting killed, for example? Any unexpected "busy" at umount(2) time
would translate into filesystem instances stuck around (already detached
from any mount trees) for unspecified time; not a good thing, obviously,
and not something a userland helper had a chance to help with...
Details, please.
next prev parent reply other threads:[~2024-07-29 0:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-28 19:09 Why do very few filesystems have umount helpers Steve French
2024-07-29 0:01 ` Al Viro [this message]
2024-07-29 4:16 ` Steve French
2024-07-29 4:33 ` Steve French
2024-07-29 9:50 ` Christian Brauner
2024-07-29 17:33 ` Steve French
2024-07-29 21:50 ` Steve French
2024-07-30 2:54 ` Dave Chinner
2024-07-29 17:31 ` Andreas Dilger
2024-07-29 20:26 ` Steve French
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=20240729000124.GH99483@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=smfrench@gmail.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