linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] autofs - fix some word usage odities in autofs.txt
@ 2019-03-18  1:00 Ian Kent
  2019-03-18  1:00 ` [PATCH 2/5] autofs - update autofs.txt for strictexpire mount option Ian Kent
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ian Kent @ 2019-03-18  1:00 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Kernel Mailing List, autofs mailing list, linux-fsdevel

Alter a few word usages in Documentation/filesystems/autofs.txt
and correct some spelling mistakes.

Signed-off-by: Ian Kent <raven@themaw.net>
---
 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 {


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/5] autofs - update autofs.txt for strictexpire mount option
  2019-03-18  1:00 [PATCH 1/5] autofs - fix some word usage odities in autofs.txt Ian Kent
@ 2019-03-18  1:00 ` Ian Kent
  2019-03-18  1:00 ` [PATCH 3/5] autofs - update AUTOFS_EXP_LEAVES description Ian Kent
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Ian Kent @ 2019-03-18  1:00 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Kernel Mailing List, autofs mailing list, linux-fsdevel

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 <raven@themaw.net>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/5] autofs - update AUTOFS_EXP_LEAVES description
  2019-03-18  1:00 [PATCH 1/5] autofs - fix some word usage odities in autofs.txt Ian Kent
  2019-03-18  1:00 ` [PATCH 2/5] autofs - update autofs.txt for strictexpire mount option Ian Kent
@ 2019-03-18  1:00 ` Ian Kent
  2019-03-18  1:00 ` [PATCH 4/5] autofs - update mount control expire desription with AUTOFS_EXP_FORCED Ian Kent
  2019-03-18  1:00 ` [PATCH 5/5] autofs - add description of ignore pseudo mount option Ian Kent
  3 siblings, 0 replies; 5+ messages in thread
From: Ian Kent @ 2019-03-18  1:00 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Kernel Mailing List, autofs mailing list, linux-fsdevel

Update the description of AUTOFS_EXP_LEAVES to cover its possible
future use with amd format mount maps.

Signed-off-by: Ian Kent <raven@themaw.net>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 4/5] autofs - update mount control expire desription with AUTOFS_EXP_FORCED
  2019-03-18  1:00 [PATCH 1/5] autofs - fix some word usage odities in autofs.txt Ian Kent
  2019-03-18  1:00 ` [PATCH 2/5] autofs - update autofs.txt for strictexpire mount option Ian Kent
  2019-03-18  1:00 ` [PATCH 3/5] autofs - update AUTOFS_EXP_LEAVES description Ian Kent
@ 2019-03-18  1:00 ` Ian Kent
  2019-03-18  1:00 ` [PATCH 5/5] autofs - add description of ignore pseudo mount option Ian Kent
  3 siblings, 0 replies; 5+ messages in thread
From: Ian Kent @ 2019-03-18  1:00 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Kernel Mailing List, autofs mailing list, linux-fsdevel

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 <raven@themaw.net>
---
 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.
 


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 5/5] autofs - add description of ignore pseudo mount option
  2019-03-18  1:00 [PATCH 1/5] autofs - fix some word usage odities in autofs.txt Ian Kent
                   ` (2 preceding siblings ...)
  2019-03-18  1:00 ` [PATCH 4/5] autofs - update mount control expire desription with AUTOFS_EXP_FORCED Ian Kent
@ 2019-03-18  1:00 ` Ian Kent
  3 siblings, 0 replies; 5+ messages in thread
From: Ian Kent @ 2019-03-18  1:00 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Kernel Mailing List, autofs mailing list, linux-fsdevel

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 <raven@themaw.net>
---
 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
 --------------------------------------
 


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-03-18  1:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-18  1:00 [PATCH 1/5] autofs - fix some word usage odities in autofs.txt Ian Kent
2019-03-18  1:00 ` [PATCH 2/5] autofs - update autofs.txt for strictexpire mount option Ian Kent
2019-03-18  1:00 ` [PATCH 3/5] autofs - update AUTOFS_EXP_LEAVES description Ian Kent
2019-03-18  1:00 ` [PATCH 4/5] autofs - update mount control expire desription with AUTOFS_EXP_FORCED Ian Kent
2019-03-18  1:00 ` [PATCH 5/5] autofs - add description of ignore pseudo mount option Ian Kent

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).