Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
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 11:50:47 +0200	[thread overview]
Message-ID: <20240729-abwesend-absondern-e90f3209e666@brauner> (raw)
In-Reply-To: <CAH2r5ms+vyNND3XPkBo+HYEj3-YMSwqZJup8BSt2B3LYOgPF+A@mail.gmail.com>

On Sun, Jul 28, 2024 at 02:09:14PM GMT, Steve French wrote:
> I noticed that nfs has a umount helper (/sbin/umount.nfs) as does hfs
> (as does /sbin/umount.udisks2).  Any ideas why those are the only
> three filesystems have them but other fs don't?

Helpers such as mount.* or umount.* are used by util-linux. They're not
supposed to be directly used (usually).

For example, umount.udisks talks to the udisks daemon which keeps state
on the block devices it manages and it also cleans up things that were
created (directories etc.) at mount time. Such mounts are usually marked
e.g., via helper=udisks to instruct util-linux to call umount.udisks

Similar things probably apply to the others.

> 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.   As you can see from fs/namespace.c there is no mount
> notification normally (only on "force" unmounts)

The first step should be to identify what exactly keeps your mount busy
in generic/044 and generic/043. If you don't know what the cause of this
is no notification from VFS will help you. My guess is that this ends up
being fixable in cifs.

  parent reply	other threads:[~2024-07-29  9:50 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
2024-07-29  4:16   ` Steve French
2024-07-29  4:33     ` Steve French
2024-07-29  9:50 ` Christian Brauner [this message]
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=20240729-abwesend-absondern-e90f3209e666@brauner \
    --to=brauner@kernel.org \
    --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