From: Steve Dickson <SteveD@RedHat.com>
To: NeilBrown <neilb@suse.com>,
util-linux@vger.kernel.org,
Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Cc: Franck Bui <fbui@suse.com>
Subject: Re: [nfs-utils PATCH] umount.nfs: assume path name is canonical.
Date: Tue, 13 Jun 2017 08:40:26 -0400 [thread overview]
Message-ID: <fddad636-4a27-dd44-1b7f-edfb81005049@RedHat.com> (raw)
In-Reply-To: <8737bfduq8.fsf@notabene.neil.brown.name>
On 06/04/2017 10:38 PM, NeilBrown wrote:
>
> /usr/bin/umount will always pass a canonical name
> to umount.nfs, so it is safe to disable canonicalization.
>
> When umounting an NFS filesystem, it is generally safest to
> not "stat" the mountpoint at all as that can block
> indefinitely. umount() will not block, but lstat() etc can.
> By disabling canonicalization in libmount, we discourage it
> from ever calling 'stat' family operations, and thus reduce
> the chance of a hang.
>
> Note that to be fully effective, this requires changes to
> util-linux which have not yet been accepted.
> When both that change and this are in effect, automounters
> can use "umount -c $PATH" to safely unmount a filesystem
> without blocking.
>
> Signed-off-by: NeilBrown <neilb@suse.com>
Committed...
steved.
> ---
> utils/mount/mount_libmount.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/utils/mount/mount_libmount.c b/utils/mount/mount_libmount.c
> index 1f01f7f7a4e7..2d4065759a6c 100644
> --- a/utils/mount/mount_libmount.c
> +++ b/utils/mount/mount_libmount.c
> @@ -188,6 +188,7 @@ static int umount_main(struct libmnt_context *cxt, int argc, char **argv)
> };
>
> mnt_context_init_helper(cxt, MNT_ACT_UMOUNT, 0);
> + mnt_context_disable_canonicalize(cxt, 1);
>
> while ((c = getopt_long (argc, argv, "fvnrlh", longopts, NULL)) != -1) {
>
>
next prev parent reply other threads:[~2017-06-13 12:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-05 2:32 [util-linux PATCH] umount: never 'stat' the path when "-c" is given NeilBrown
2017-06-05 2:38 ` [nfs-utils PATCH] umount.nfs: assume path name is canonical NeilBrown
2017-06-13 12:40 ` Steve Dickson [this message]
2017-06-06 9:43 ` [util-linux PATCH] umount: never 'stat' the path when "-c" is given Karel Zak
2017-06-07 9:44 ` Karel Zak
2017-06-07 10:54 ` Karel Zak
2017-06-09 4:23 ` NeilBrown
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=fddad636-4a27-dd44-1b7f-edfb81005049@RedHat.com \
--to=steved@redhat.com \
--cc=fbui@suse.com \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.com \
--cc=util-linux@vger.kernel.org \
/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