From patchwork Mon Mar 18 01:00:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Kent X-Patchwork-Id: 10856723 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CA2C21575 for ; Mon, 18 Mar 2019 01:00:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D47B2914E for ; Mon, 18 Mar 2019 01:00:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9159429180; Mon, 18 Mar 2019 01:00:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 734712914E for ; Mon, 18 Mar 2019 01:00:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727628AbfCRBA2 (ORCPT ); Sun, 17 Mar 2019 21:00:28 -0400 Received: from icp-osb-irony-out8.external.iinet.net.au ([203.59.1.225]:8677 "EHLO icp-osb-irony-out8.external.iinet.net.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726122AbfCRBA2 (ORCPT ); Sun, 17 Mar 2019 21:00:28 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2CGBAAv7I5c/44x0HZZCoIXghGBOCESJ4QLlAkBAQIBAQaBEDiJLY5xFIFnIBgBhECEUiI0CQ0BAQMBAQEIAQMCbSiFdARSKAEMAhgOAkkWE4ULDKlRfDMaAooJgQskizAXeIEHgUSCKoULE4MiglcDigMkgjGELUw7kkkJkyUZiyQDiDCDPpwzOIFWTS4KgyeQWDUwgQUBAY1LAQE X-IPAS-Result: A2CGBAAv7I5c/44x0HZZCoIXghGBOCESJ4QLlAkBAQIBAQaBEDiJLY5xFIFnIBgBhECEUiI0CQ0BAQMBAQEIAQMCbSiFdARSKAEMAhgOAkkWE4ULDKlRfDMaAooJgQskizAXeIEHgUSCKoULE4MiglcDigMkgjGELUw7kkkJkyUZiyQDiDCDPpwzOIFWTS4KgyeQWDUwgQUBAY1LAQE X-IronPort-AV: E=Sophos;i="5.58,491,1544457600"; d="scan'208";a="206152835" Received: from unknown (HELO pluto.themaw.net) ([118.208.49.142]) by icp-osb-irony-out8.iinet.net.au with ESMTP; 18 Mar 2019 09:00:24 +0800 Subject: [PATCH 1/5] autofs - fix some word usage odities in autofs.txt From: Ian Kent To: Andrew Morton Cc: Kernel Mailing List , autofs mailing list , linux-fsdevel Date: Mon, 18 Mar 2019 09:00:24 +0800 Message-ID: <155287082394.12593.6506084453911662450.stgit@pluto.themaw.net> User-Agent: StGit/unknown-version MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Alter a few word usages in Documentation/filesystems/autofs.txt and correct some spelling mistakes. Signed-off-by: Ian Kent --- Documentation/filesystems/autofs.txt | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/Documentation/filesystems/autofs.txt b/Documentation/filesystems/autofs.txt index 373ad25852d3..05da806b1e88 100644 --- a/Documentation/filesystems/autofs.txt +++ b/Documentation/filesystems/autofs.txt @@ -116,7 +116,7 @@ that purpose there is another flag. **DCACHE_MANAGE_TRANSIT** If a dentry has DCACHE_MANAGE_TRANSIT set then two very different but -related behaviors are invoked, both using the `d_op->d_manage()` +related behaviours are invoked, both using the `d_op->d_manage()` dentry operation. Firstly, before checking to see if any filesystem is mounted on the @@ -193,8 +193,8 @@ VFS remain in RCU-walk mode, but can only tell it to get out of RCU-walk mode by returning `-ECHILD`. So `d_manage()`, when called with `rcu_walk` set, should either return --ECHILD if there is any reason to believe it is unsafe to end the -mounted filesystem, and otherwise should return 0. +-ECHILD if there is any reason to believe it is unsafe to enter the +mounted filesystem, otherwise it should return 0. autofs will return `-ECHILD` if an expiry of the filesystem has been initiated or is being considered, otherwise it returns 0. @@ -210,7 +210,7 @@ mounts that were created by `d_automount()` returning a filesystem to be mounted. As autofs doesn't return such a filesystem but leaves the mounting to the automount daemon, it must involve the automount daemon in unmounting as well. This also means that autofs has more control -of expiry. +over expiry. The VFS also supports "expiry" of mounts using the MNT_EXPIRE flag to the `umount` system call. Unmounting with MNT_EXPIRE will fail unless @@ -225,7 +225,7 @@ unmount any filesystems mounted on the autofs filesystem or remove any symbolic links or empty directories any time it likes. If the unmount or removal is successful the filesystem will be returned to the state it was before the mount or creation, so that any access of the name -will trigger normal auto-mount processing. In particlar, `rmdir` and +will trigger normal auto-mount processing. In particular, `rmdir` and `unlink` do not leave negative entries in the dcache as a normal filesystem would, so an attempt to access a recently-removed object is passed to autofs for handling. @@ -242,7 +242,7 @@ time stamp on each directory or symlink. For symlinks it genuinely does record the last time the symlink was "used" or followed to find out where it points to. For directories the field is a slight misnomer. It actually records the last time that autofs checked if -the directory or one of its descendents was busy and found that it +the directory or one of its descendants was busy and found that it was. This is just as useful and doesn't require updating the field so often. @@ -255,7 +255,7 @@ up. There is an option with indirect mounts to consider each of the leaves that has been mounted on instead of considering the top-level names. -This is intended for compatability with version 4 of autofs and should +This is intended for compatibility with version 4 of autofs and should be considered as deprecated. When autofs considers a directory it checks the `last_used` time and @@ -273,7 +273,7 @@ mounts. If it finds something in the root directory to expire it will return the name of that thing. Once a name has been returned the automount daemon needs to unmount any filesystems mounted below the name normally. As described above, this is unsafe for non-toplevel -mounts in a version-5 autofs. For this reason the current `automountd` +mounts in a version-5 autofs. For this reason the current `automount(8)` does not use this ioctl. The second mechanism uses either the **AUTOFS_DEV_IOCTL_EXPIRE_CMD** or @@ -345,7 +345,7 @@ The `wait_queue_token` is a unique number which can identify a particular request to be acknowledged. When a message is sent over the pipe the affected dentry is marked as either "active" or "expiring" and other accesses to it block until the message is -acknowledged using one of the ioctls below and the relevant +acknowledged using one of the ioctls below with the relevant `wait_queue_token`. Communicating with autofs: root directory ioctls @@ -367,15 +367,14 @@ The available ioctl commands are: This mode is also entered if a write to the pipe fails. - **AUTOFS_IOC_PROTOVER**: This returns the protocol version in use. - **AUTOFS_IOC_PROTOSUBVER**: Returns the protocol sub-version which - is really a version number for the implementation. It is - currently 2. + is really a version number for the implementation. - **AUTOFS_IOC_SETTIMEOUT**: This passes a pointer to an unsigned long. The value is used to set the timeout for expiry, and the current timeout value is stored back through the pointer. - **AUTOFS_IOC_ASKUMOUNT**: Returns, in the pointed-to `int`, 1 if the filesystem could be unmounted. This is only a hint as the situation could change at any instant. This call can be - use to avoid a more expensive full unmount attempt. + used to avoid a more expensive full unmount attempt. - **AUTOFS_IOC_EXPIRE**: as described above, this asks if there is anything suitable to expire. A pointer to a packet: @@ -415,7 +414,7 @@ which can be used to communicate directly with the autofs filesystem. It requires CAP_SYS_ADMIN for access. The `ioctl`s that can be used on this device are described in a separate -document `autofs-mount-control.txt`, and are summarized briefly here. +document `autofs-mount-control.txt`, and are summarised briefly here. Each ioctl is passed a pointer to an `autofs_dev_ioctl` structure: struct autofs_dev_ioctl { From patchwork Mon Mar 18 01:00:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Kent X-Patchwork-Id: 10856727 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F41171575 for ; Mon, 18 Mar 2019 01:00:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3EE32914E for ; Mon, 18 Mar 2019 01:00:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C80C429180; Mon, 18 Mar 2019 01:00:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6DD852914E for ; Mon, 18 Mar 2019 01:00:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727693AbfCRBAe (ORCPT ); Sun, 17 Mar 2019 21:00:34 -0400 Received: from icp-osb-irony-out8.external.iinet.net.au ([203.59.1.225]:8677 "EHLO icp-osb-irony-out8.external.iinet.net.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726122AbfCRBAe (ORCPT ); Sun, 17 Mar 2019 21:00:34 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2BeAAAv7I5c/44x0HZjHgEGBwaBUQkLAYFmKoE4IRInhAuUCQEBAgEBBoEQOIktjnGBeyAYAYRAAoRQIjQJDQEBAwEBAQgBAwJtKIVLBiNWEBgBDAIYDgICRxAGE4ULDKlRgS8aAooJgQskAYsvF3iBB4FEimqCVwOKAxgbgiKEeTtfkWoJkyUZgXyBfocqA4USgx6DPohgk1M4gVZNLgqDJ4MtAQGNKTUwgQUBAY1LAQE X-IPAS-Result: A2BeAAAv7I5c/44x0HZjHgEGBwaBUQkLAYFmKoE4IRInhAuUCQEBAgEBBoEQOIktjnGBeyAYAYRAAoRQIjQJDQEBAwEBAQgBAwJtKIVLBiNWEBgBDAIYDgICRxAGE4ULDKlRgS8aAooJgQskAYsvF3iBB4FEimqCVwOKAxgbgiKEeTtfkWoJkyUZgXyBfocqA4USgx6DPohgk1M4gVZNLgqDJ4MtAQGNKTUwgQUBAY1LAQE X-IronPort-AV: E=Sophos;i="5.58,491,1544457600"; d="scan'208";a="206152855" Received: from unknown (HELO pluto.themaw.net) ([118.208.49.142]) by icp-osb-irony-out8.iinet.net.au with ESMTP; 18 Mar 2019 09:00:30 +0800 Subject: [PATCH 2/5] autofs - update autofs.txt for strictexpire mount option From: Ian Kent To: Andrew Morton Cc: Kernel Mailing List , autofs mailing list , linux-fsdevel Date: Mon, 18 Mar 2019 09:00:30 +0800 Message-ID: <155287083000.12593.2722713092537666885.stgit@pluto.themaw.net> In-Reply-To: <155287082394.12593.6506084453911662450.stgit@pluto.themaw.net> References: <155287082394.12593.6506084453911662450.stgit@pluto.themaw.net> User-Agent: StGit/unknown-version MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP A "strictexpire" mount option has been added to the autofs file system. It is meant to be used in cases where a GUI continually accesses or an application frquently scans an automount directory tree causing an accumulation of otherwise unused mounts. Signed-off-by: Ian Kent --- Documentation/filesystems/autofs.txt | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Documentation/filesystems/autofs.txt b/Documentation/filesystems/autofs.txt index 05da806b1e88..ac50b47f02bd 100644 --- a/Documentation/filesystems/autofs.txt +++ b/Documentation/filesystems/autofs.txt @@ -240,11 +240,18 @@ Normally the daemon only wants to remove entries which haven't been used for a while. For this purpose autofs maintains a "`last_used`" time stamp on each directory or symlink. For symlinks it genuinely does record the last time the symlink was "used" or followed to find -out where it points to. For directories the field is a slight -misnomer. It actually records the last time that autofs checked if -the directory or one of its descendants was busy and found that it -was. This is just as useful and doesn't require updating the field so -often. +out where it points to. For directories the field is used slightly +differently. The field is updated at mount time and during expire +checks if it is found to be in use (ie. open file descriptor or +process working directory) and during path walks. The update done +during path walks prevents frequent expire and immediate mount of +frequently accessed automounts. But in the case where a GUI continually +access or an application frequently scans an autofs directory tree +there can be an accumulation of mounts that aren't actually being +used. To cater for this case the "`strictexpire`" autofs mount option +can be used to avoid the "`last_used`" update on path walk thereby +preventing this apparent inability to expire mounts that aren't +really in use. The daemon is able to ask autofs if anything is due to be expired, using an `ioctl` as discussed later. For a *direct* mount, autofs From patchwork Mon Mar 18 01:00:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Kent X-Patchwork-Id: 10856725 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5E816139A for ; Mon, 18 Mar 2019 01:00:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3BC1D2914E for ; Mon, 18 Mar 2019 01:00:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2ED0729180; Mon, 18 Mar 2019 01:00:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C56A02914E for ; Mon, 18 Mar 2019 01:00:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727734AbfCRBAi (ORCPT ); Sun, 17 Mar 2019 21:00:38 -0400 Received: from icp-osb-irony-out8.external.iinet.net.au ([203.59.1.225]:8677 "EHLO icp-osb-irony-out8.external.iinet.net.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727725AbfCRBAh (ORCPT ); Sun, 17 Mar 2019 21:00:37 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2BeAAAv7I5c/44x0HZjHgEGBwaBUQkLAYIQgTghEieEC5QJAQECAQEGgRA4iS2JXoUTgXsgGAGEQAKEUCI0CQ0BAQMBAQEIAQMCbSiFSwYjVhAYAQwCGA4CAkcQBhOFCwypUYEvGgKKCYELJAGLLxd4gQeBRIpqglcDjFiEeTuSSQmTJRmBfIkoA4gwLYMRiGCTUziBVk0uCoMnkFg1MIEFAQGNSwEB X-IPAS-Result: A2BeAAAv7I5c/44x0HZjHgEGBwaBUQkLAYIQgTghEieEC5QJAQECAQEGgRA4iS2JXoUTgXsgGAGEQAKEUCI0CQ0BAQMBAQEIAQMCbSiFSwYjVhAYAQwCGA4CAkcQBhOFCwypUYEvGgKKCYELJAGLLxd4gQeBRIpqglcDjFiEeTuSSQmTJRmBfIkoA4gwLYMRiGCTUziBVk0uCoMnkFg1MIEFAQGNSwEB X-IronPort-AV: E=Sophos;i="5.58,491,1544457600"; d="scan'208";a="206152891" Received: from unknown (HELO pluto.themaw.net) ([118.208.49.142]) by icp-osb-irony-out8.iinet.net.au with ESMTP; 18 Mar 2019 09:00:35 +0800 Subject: [PATCH 3/5] autofs - update AUTOFS_EXP_LEAVES description From: Ian Kent To: Andrew Morton Cc: Kernel Mailing List , autofs mailing list , linux-fsdevel Date: Mon, 18 Mar 2019 09:00:35 +0800 Message-ID: <155287083538.12593.18163159677020718048.stgit@pluto.themaw.net> In-Reply-To: <155287082394.12593.6506084453911662450.stgit@pluto.themaw.net> References: <155287082394.12593.6506084453911662450.stgit@pluto.themaw.net> User-Agent: StGit/unknown-version MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Update the description of AUTOFS_EXP_LEAVES to cover its possible future use with amd format mount maps. Signed-off-by: Ian Kent --- Documentation/filesystems/autofs.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Documentation/filesystems/autofs.txt b/Documentation/filesystems/autofs.txt index ac50b47f02bd..8fe43c97cb96 100644 --- a/Documentation/filesystems/autofs.txt +++ b/Documentation/filesystems/autofs.txt @@ -262,8 +262,12 @@ up. There is an option with indirect mounts to consider each of the leaves that has been mounted on instead of considering the top-level names. -This is intended for compatibility with version 4 of autofs and should -be considered as deprecated. +This was originally intended for compatibility with version 4 of autofs +and should be considered as deprecated for Sun Format automount maps. +However, it may be used again for amd format mount maps (which are +generally indirect maps) because the amd automounter allows for the +setting of an expire timeout for individual mounts. But there are +some difficulties in making the needed changes for this. When autofs considers a directory it checks the `last_used` time and compares it with the "timeout" value set when the filesystem was From patchwork Mon Mar 18 01:00:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Kent X-Patchwork-Id: 10856729 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 70AC017EF for ; Mon, 18 Mar 2019 01:00:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 510212914E for ; Mon, 18 Mar 2019 01:00:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4530929176; Mon, 18 Mar 2019 01:00:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E3D4C29190 for ; Mon, 18 Mar 2019 01:00:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727753AbfCRBAp (ORCPT ); Sun, 17 Mar 2019 21:00:45 -0400 Received: from icp-osb-irony-out8.external.iinet.net.au ([203.59.1.225]:8677 "EHLO icp-osb-irony-out8.external.iinet.net.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727725AbfCRBAp (ORCPT ); Sun, 17 Mar 2019 21:00:45 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2BeAAAv7I5c/44x0HZjHgEGBwaBUQkLAYIQgTghEieEC5QJAQECAQEGgRA4iS2JXoUTgXsgGAGENgoChFAiNAkNAQEDAQEBCAEDAm0ohUsGI1YQGAEMAhgOAgJHEAYThQsMqVGBLxoCigmBCyQBiy8XeIEHgUSCKohAglcDihsbgiKELUw7X5FqCZMlGYF8iSgDiDAtgxGIYJNTOIFWTS4KgyeCQI4YNTCBBQEBjUsBAQ X-IPAS-Result: A2BeAAAv7I5c/44x0HZjHgEGBwaBUQkLAYIQgTghEieEC5QJAQECAQEGgRA4iS2JXoUTgXsgGAGENgoChFAiNAkNAQEDAQEBCAEDAm0ohUsGI1YQGAEMAhgOAgJHEAYThQsMqVGBLxoCigmBCyQBiy8XeIEHgUSCKohAglcDihsbgiKELUw7X5FqCZMlGYF8iSgDiDAtgxGIYJNTOIFWTS4KgyeCQI4YNTCBBQEBjUsBAQ X-IronPort-AV: E=Sophos;i="5.58,491,1544457600"; d="scan'208";a="206152905" Received: from unknown (HELO pluto.themaw.net) ([118.208.49.142]) by icp-osb-irony-out8.iinet.net.au with ESMTP; 18 Mar 2019 09:00:40 +0800 Subject: [PATCH 4/5] autofs - update mount control expire desription with AUTOFS_EXP_FORCED From: Ian Kent To: Andrew Morton Cc: Kernel Mailing List , autofs mailing list , linux-fsdevel Date: Mon, 18 Mar 2019 09:00:40 +0800 Message-ID: <155287084078.12593.15000931045413195778.stgit@pluto.themaw.net> In-Reply-To: <155287082394.12593.6506084453911662450.stgit@pluto.themaw.net> References: <155287082394.12593.6506084453911662450.stgit@pluto.themaw.net> User-Agent: StGit/unknown-version MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Describe AUTOFS_EXP_FORCED in addition to AUTOFS_EXP_IMMEDIATE in the description of the AUTOFS_DEV_IOCTL_EXPIRE_CMD ioctl. Signed-off-by: Ian Kent --- Documentation/filesystems/autofs-mount-control.txt | 6 ++++-- Documentation/filesystems/autofs.txt | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Documentation/filesystems/autofs-mount-control.txt b/Documentation/filesystems/autofs-mount-control.txt index 45edad6933cc..acc02fc57993 100644 --- a/Documentation/filesystems/autofs-mount-control.txt +++ b/Documentation/filesystems/autofs-mount-control.txt @@ -354,8 +354,10 @@ this ioctl is called until no further expire candidates are found. The call requires an initialized struct autofs_dev_ioctl with the ioctlfd field set to the descriptor obtained from the open call. In -addition an immediate expire, independent of the mount timeout, can be -requested by setting the how field of struct args_expire to 1. If no +addition an immediate expire that's independent of the mount timeout, +and a forced expire that's independent of whether the mount is busy, +can be requested by setting the how field of struct args_expire to +AUTOFS_EXP_IMMEDIATE or AUTOFS_EXP_FORCED, respectively . If no expire candidates can be found the ioctl returns -1 with errno set to EAGAIN. diff --git a/Documentation/filesystems/autofs.txt b/Documentation/filesystems/autofs.txt index 8fe43c97cb96..409e6411904d 100644 --- a/Documentation/filesystems/autofs.txt +++ b/Documentation/filesystems/autofs.txt @@ -410,6 +410,11 @@ The available ioctl commands are: **AUTOFS_EXP_IMMEDIATE** causes `last_used` time to be ignored and objects are expired if the are not in use. + **AUTOFS_EXP_FORCED** causes the in use status to be ignored + and objects are expired ieven if they are in use. This assumes + that the daemon has requested this because it is capable of + performing the umount. + **AUTOFS_EXP_LEAVES** will select a leaf rather than a top-level name to expire. This is only safe when *maxproto* is 4. From patchwork Mon Mar 18 01:00:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Kent X-Patchwork-Id: 10856731 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7057E139A for ; Mon, 18 Mar 2019 01:00:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4EA042914E for ; Mon, 18 Mar 2019 01:00:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 42EEC29180; Mon, 18 Mar 2019 01:00:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DAEF22914E for ; Mon, 18 Mar 2019 01:00:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727782AbfCRBAv (ORCPT ); Sun, 17 Mar 2019 21:00:51 -0400 Received: from icp-osb-irony-out8.external.iinet.net.au ([203.59.1.225]:8677 "EHLO icp-osb-irony-out8.external.iinet.net.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727769AbfCRBAt (ORCPT ); Sun, 17 Mar 2019 21:00:49 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2BrAQAv7I5c/44x0HZjHQEBBQEHBQGBVAUBCwGCEIE4IRInhAuUCQEBAgEBBoFIiS2QbCAYAYRAAoRQIjcGDQEBAwEBAQgBAwJtKIVLBiNWEBgBDAIYDgICRxAGE4ULDKlRgS8aAooJgQskAYsvF3iBB4wuglcDiieCMYQtTDuSSQmTJRmLJAOIMIM+nEkigVZNLgo7gmyQWDUwgQUBAY1LAQE X-IPAS-Result: A2BrAQAv7I5c/44x0HZjHQEBBQEHBQGBVAUBCwGCEIE4IRInhAuUCQEBAgEBBoFIiS2QbCAYAYRAAoRQIjcGDQEBAwEBAQgBAwJtKIVLBiNWEBgBDAIYDgICRxAGE4ULDKlRgS8aAooJgQskAYsvF3iBB4wuglcDiieCMYQtTDuSSQmTJRmLJAOIMIM+nEkigVZNLgo7gmyQWDUwgQUBAY1LAQE X-IronPort-AV: E=Sophos;i="5.58,491,1544457600"; d="scan'208";a="206152914" Received: from unknown (HELO pluto.themaw.net) ([118.208.49.142]) by icp-osb-irony-out8.iinet.net.au with ESMTP; 18 Mar 2019 09:00:46 +0800 Subject: [PATCH 5/5] autofs - add description of ignore pseudo mount option From: Ian Kent To: Andrew Morton Cc: Kernel Mailing List , autofs mailing list , linux-fsdevel Date: Mon, 18 Mar 2019 09:00:46 +0800 Message-ID: <155287084617.12593.812733161112154904.stgit@pluto.themaw.net> In-Reply-To: <155287082394.12593.6506084453911662450.stgit@pluto.themaw.net> References: <155287082394.12593.6506084453911662450.stgit@pluto.themaw.net> User-Agent: StGit/unknown-version MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a idescription of the "ignore" pseudo mount option that can be used to provide a generic indicator to applications that the mount entry should be ignored when displaying mount information. Signed-off-by: Ian Kent --- Documentation/filesystems/autofs.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Documentation/filesystems/autofs.txt b/Documentation/filesystems/autofs.txt index 409e6411904d..3af38c7fd26d 100644 --- a/Documentation/filesystems/autofs.txt +++ b/Documentation/filesystems/autofs.txt @@ -526,6 +526,21 @@ directories. Catatonic mode can only be left via the **AUTOFS_DEV_IOCTL_OPENMOUNT_CMD** ioctl on the `/dev/autofs`. +The "ignore" mount option +------------------------- + +The "ignore" mount option can be used to provide a generic indicator +to applications that the mount entry should be ignored when displaying +mount information. + +In other OSes that provide autofs and that provide a mount list to user +space based on the kernel mount list a no-op mount option ("ignore" is +the one use on the most common OSes) is allowed so that autofs file +system users can optionally use it. + +This is intended to be used by user space programs to exclude autofs +mounts from consideration when reading the mounts list. + autofs, name spaces, and shared mounts --------------------------------------