From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:33930 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751321AbdFGPzx (ORCPT ); Wed, 7 Jun 2017 11:55:53 -0400 Date: Wed, 7 Jun 2017 17:55:46 +0200 From: Karel Zak To: NeilBrown Cc: Ian Kent , autofs mailing list , linux-nfs@vger.kernel.org, util-linux@vger.kernel.org Subject: Re: [autofs PATCH] Add -c option when calling /bin/umount - if supported. Message-ID: <20170607155546.os45xr6zv5emhf7g@ws.net.home> References: <87d1agd4cu.fsf@notabene.neil.brown.name> <20170607155202.5zyzuvy6l3fsawkl@ws.net.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20170607155202.5zyzuvy6l3fsawkl@ws.net.home> Sender: linux-nfs-owner@vger.kernel.org List-ID: On Wed, Jun 07, 2017 at 05:52:02PM +0200, Karel Zak wrote: > On Wed, Jun 07, 2017 at 10:32:49AM +1000, NeilBrown wrote: > > > > The "-c" option has been supported by umount since util-linux 2.17. > > It tells umount that the path name is "canonical", meaning no > > symlinks or ".." etc. > > This is appropriate for autofs to use and it always uses canonical > > path names. > > The advantage of "-c" is that it means umount doesn't need to > > 'lstat()' the path so much. > > It would be also nice to force systemd to use "umount -c" on shutdown > to avoid automount storm... $ git blame -L889,+1 src/core/mount.c 83897d54 (Neil Brown 2017-06-07 22:28:23 +1000 889) r = exec_command_set(m->control_command, UMOUNT_PATH, m->where, "-c", NULL); OK.... ;-) Karel -- Karel Zak http://karelzak.blogspot.com