Back to home page

OSCL-LXR

 
 

    


0001 =====================
0002 autofs - how it works
0003 =====================
0004 
0005 Purpose
0006 =======
0007 
0008 The goal of autofs is to provide on-demand mounting and race free
0009 automatic unmounting of various other filesystems.  This provides two
0010 key advantages:
0011 
0012 1. There is no need to delay boot until all filesystems that
0013    might be needed are mounted.  Processes that try to access those
0014    slow filesystems might be delayed but other processes can
0015    continue freely.  This is particularly important for
0016    network filesystems (e.g. NFS) or filesystems stored on
0017    media with a media-changing robot.
0018 
0019 2. The names and locations of filesystems can be stored in
0020    a remote database and can change at any time.  The content
0021    in that data base at the time of access will be used to provide
0022    a target for the access.  The interpretation of names in the
0023    filesystem can even be programmatic rather than database-backed,
0024    allowing wildcards for example, and can vary based on the user who
0025    first accessed a name.
0026 
0027 Context
0028 =======
0029 
0030 The "autofs" filesystem module is only one part of an autofs system.
0031 There also needs to be a user-space program which looks up names
0032 and mounts filesystems.  This will often be the "automount" program,
0033 though other tools including "systemd" can make use of "autofs".
0034 This document describes only the kernel module and the interactions
0035 required with any user-space program.  Subsequent text refers to this
0036 as the "automount daemon" or simply "the daemon".
0037 
0038 "autofs" is a Linux kernel module which provides the "autofs"
0039 filesystem type.  Several "autofs" filesystems can be mounted and they
0040 can each be managed separately, or all managed by the same daemon.
0041 
0042 Content
0043 =======
0044 
0045 An autofs filesystem can contain 3 sorts of objects: directories,
0046 symbolic links and mount traps.  Mount traps are directories with
0047 extra properties as described in the next section.
0048 
0049 Objects can only be created by the automount daemon: symlinks are
0050 created with a regular `symlink` system call, while directories and
0051 mount traps are created with `mkdir`.  The determination of whether a
0052 directory should be a mount trap is based on a master map. This master
0053 map is consulted by autofs to determine which directories are mount
0054 points. Mount points can be *direct*/*indirect*/*offset*.
0055 On most systems, the default master map is located at */etc/auto.master*.
0056 
0057 If neither the *direct* or *offset* mount options are given (so the
0058 mount is considered to be *indirect*), then the root directory is
0059 always a regular directory, otherwise it is a mount trap when it is
0060 empty and a regular directory when not empty.  Note that *direct* and
0061 *offset* are treated identically so a concise summary is that the root
0062 directory is a mount trap only if the filesystem is mounted *direct*
0063 and the root is empty.
0064 
0065 Directories created in the root directory are mount traps only if the
0066 filesystem is mounted *indirect* and they are empty.
0067 
0068 Directories further down the tree depend on the *maxproto* mount
0069 option and particularly whether it is less than five or not.
0070 When *maxproto* is five, no directories further down the
0071 tree are ever mount traps, they are always regular directories.  When
0072 the *maxproto* is four (or three), these directories are mount traps
0073 precisely when they are empty.
0074 
0075 So: non-empty (i.e. non-leaf) directories are never mount traps. Empty
0076 directories are sometimes mount traps, and sometimes not depending on
0077 where in the tree they are (root, top level, or lower), the *maxproto*,
0078 and whether the mount was *indirect* or not.
0079 
0080 Mount Traps
0081 ===========
0082 
0083 A core element of the implementation of autofs is the Mount Traps
0084 which are provided by the Linux VFS.  Any directory provided by a
0085 filesystem can be designated as a trap.  This involves two separate
0086 features that work together to allow autofs to do its job.
0087 
0088 **DCACHE_NEED_AUTOMOUNT**
0089 
0090 If a dentry has the DCACHE_NEED_AUTOMOUNT flag set (which gets set if
0091 the inode has S_AUTOMOUNT set, or can be set directly) then it is
0092 (potentially) a mount trap.  Any access to this directory beyond a
0093 "`stat`" will (normally) cause the `d_op->d_automount()` dentry operation
0094 to be called. The task of this method is to find the filesystem that
0095 should be mounted on the directory and to return it.  The VFS is
0096 responsible for actually mounting the root of this filesystem on the
0097 directory.
0098 
0099 autofs doesn't find the filesystem itself but sends a message to the
0100 automount daemon asking it to find and mount the filesystem.  The
0101 autofs `d_automount` method then waits for the daemon to report that
0102 everything is ready.  It will then return "`NULL`" indicating that the
0103 mount has already happened.  The VFS doesn't try to mount anything but
0104 follows down the mount that is already there.
0105 
0106 This functionality is sufficient for some users of mount traps such
0107 as NFS which creates traps so that mountpoints on the server can be
0108 reflected on the client.  However it is not sufficient for autofs.  As
0109 mounting onto a directory is considered to be "beyond a `stat`", the
0110 automount daemon would not be able to mount a filesystem on the 'trap'
0111 directory without some way to avoid getting caught in the trap.  For
0112 that purpose there is another flag.
0113 
0114 **DCACHE_MANAGE_TRANSIT**
0115 
0116 If a dentry has DCACHE_MANAGE_TRANSIT set then two very different but
0117 related behaviours are invoked, both using the `d_op->d_manage()`
0118 dentry operation.
0119 
0120 Firstly, before checking to see if any filesystem is mounted on the
0121 directory, d_manage() will be called with the `rcu_walk` parameter set
0122 to `false`.  It may return one of three things:
0123 
0124 -  A return value of zero indicates that there is nothing special
0125    about this dentry and normal checks for mounts and automounts
0126    should proceed.
0127 
0128    autofs normally returns zero, but first waits for any
0129    expiry (automatic unmounting of the mounted filesystem) to
0130    complete.  This avoids races.
0131 
0132 -  A return value of `-EISDIR` tells the VFS to ignore any mounts
0133    on the directory and to not consider calling `->d_automount()`.
0134    This effectively disables the **DCACHE_NEED_AUTOMOUNT** flag
0135    causing the directory not be a mount trap after all.
0136 
0137    autofs returns this if it detects that the process performing the
0138    lookup is the automount daemon and that the mount has been
0139    requested but has not yet completed.  How it determines this is
0140    discussed later.  This allows the automount daemon not to get
0141    caught in the mount trap.
0142 
0143    There is a subtlety here.  It is possible that a second autofs
0144    filesystem can be mounted below the first and for both of them to
0145    be managed by the same daemon.  For the daemon to be able to mount
0146    something on the second it must be able to "walk" down past the
0147    first.  This means that d_manage cannot *always* return -EISDIR for
0148    the automount daemon.  It must only return it when a mount has
0149    been requested, but has not yet completed.
0150 
0151    `d_manage` also returns `-EISDIR` if the dentry shouldn't be a
0152    mount trap, either because it is a symbolic link or because it is
0153    not empty.
0154 
0155 -  Any other negative value is treated as an error and returned
0156    to the caller.
0157 
0158    autofs can return
0159 
0160    - -ENOENT if the automount daemon failed to mount anything,
0161    - -ENOMEM if it ran out of memory,
0162    - -EINTR if a signal arrived while waiting for expiry to
0163      complete
0164    - or any other error sent down by the automount daemon.
0165 
0166 
0167 The second use case only occurs during an "RCU-walk" and so `rcu_walk`
0168 will be set.
0169 
0170 An RCU-walk is a fast and lightweight process for walking down a
0171 filename path (i.e. it is like running on tip-toes).  RCU-walk cannot
0172 cope with all situations so when it finds a difficulty it falls back
0173 to "REF-walk", which is slower but more robust.
0174 
0175 RCU-walk will never call `->d_automount`; the filesystems must already
0176 be mounted or RCU-walk cannot handle the path.
0177 To determine if a mount-trap is safe for RCU-walk mode it calls
0178 `->d_manage()` with `rcu_walk` set to `true`.
0179 
0180 In this case `d_manage()` must avoid blocking and should avoid taking
0181 spinlocks if at all possible.  Its sole purpose is to determine if it
0182 would be safe to follow down into any mounted directory and the only
0183 reason that it might not be is if an expiry of the mount is
0184 underway.
0185 
0186 In the `rcu_walk` case, `d_manage()` cannot return -EISDIR to tell the
0187 VFS that this is a directory that doesn't require d_automount.  If
0188 `rcu_walk` sees a dentry with DCACHE_NEED_AUTOMOUNT set but nothing
0189 mounted, it *will* fall back to REF-walk.  `d_manage()` cannot make the
0190 VFS remain in RCU-walk mode, but can only tell it to get out of
0191 RCU-walk mode by returning `-ECHILD`.
0192 
0193 So `d_manage()`, when called with `rcu_walk` set, should either return
0194 -ECHILD if there is any reason to believe it is unsafe to enter the
0195 mounted filesystem, otherwise it should return 0.
0196 
0197 autofs will return `-ECHILD` if an expiry of the filesystem has been
0198 initiated or is being considered, otherwise it returns 0.
0199 
0200 
0201 Mountpoint expiry
0202 =================
0203 
0204 The VFS has a mechanism for automatically expiring unused mounts,
0205 much as it can expire any unused dentry information from the dcache.
0206 This is guided by the MNT_SHRINKABLE flag.  This only applies to
0207 mounts that were created by `d_automount()` returning a filesystem to be
0208 mounted.  As autofs doesn't return such a filesystem but leaves the
0209 mounting to the automount daemon, it must involve the automount daemon
0210 in unmounting as well.  This also means that autofs has more control
0211 over expiry.
0212 
0213 The VFS also supports "expiry" of mounts using the MNT_EXPIRE flag to
0214 the `umount` system call.  Unmounting with MNT_EXPIRE will fail unless
0215 a previous attempt had been made, and the filesystem has been inactive
0216 and untouched since that previous attempt.  autofs does not depend on
0217 this but has its own internal tracking of whether filesystems were
0218 recently used.  This allows individual names in the autofs directory
0219 to expire separately.
0220 
0221 With version 4 of the protocol, the automount daemon can try to
0222 unmount any filesystems mounted on the autofs filesystem or remove any
0223 symbolic links or empty directories any time it likes.  If the unmount
0224 or removal is successful the filesystem will be returned to the state
0225 it was before the mount or creation, so that any access of the name
0226 will trigger normal auto-mount processing.  In particular, `rmdir` and
0227 `unlink` do not leave negative entries in the dcache as a normal
0228 filesystem would, so an attempt to access a recently-removed object is
0229 passed to autofs for handling.
0230 
0231 With version 5, this is not safe except for unmounting from top-level
0232 directories.  As lower-level directories are never mount traps, other
0233 processes will see an empty directory as soon as the filesystem is
0234 unmounted.  So it is generally safest to use the autofs expiry
0235 protocol described below.
0236 
0237 Normally the daemon only wants to remove entries which haven't been
0238 used for a while.  For this purpose autofs maintains a "`last_used`"
0239 time stamp on each directory or symlink.  For symlinks it genuinely
0240 does record the last time the symlink was "used" or followed to find
0241 out where it points to.  For directories the field is used slightly
0242 differently.  The field is updated at mount time and during expire
0243 checks if it is found to be in use (ie. open file descriptor or
0244 process working directory) and during path walks. The update done
0245 during path walks prevents frequent expire and immediate mount of
0246 frequently accessed automounts. But in the case where a GUI continually
0247 access or an application frequently scans an autofs directory tree
0248 there can be an accumulation of mounts that aren't actually being
0249 used. To cater for this case the "`strictexpire`" autofs mount option
0250 can be used to avoid the "`last_used`" update on path walk thereby
0251 preventing this apparent inability to expire mounts that aren't
0252 really in use.
0253 
0254 The daemon is able to ask autofs if anything is due to be expired,
0255 using an `ioctl` as discussed later.  For a *direct* mount, autofs
0256 considers if the entire mount-tree can be unmounted or not.  For an
0257 *indirect* mount, autofs considers each of the names in the top level
0258 directory to determine if any of those can be unmounted and cleaned
0259 up.
0260 
0261 There is an option with indirect mounts to consider each of the leaves
0262 that has been mounted on instead of considering the top-level names.
0263 This was originally intended for compatibility with version 4 of autofs
0264 and should be considered as deprecated for Sun Format automount maps.
0265 However, it may be used again for amd format mount maps (which are
0266 generally indirect maps) because the amd automounter allows for the
0267 setting of an expire timeout for individual mounts. But there are
0268 some difficulties in making the needed changes for this.
0269 
0270 When autofs considers a directory it checks the `last_used` time and
0271 compares it with the "timeout" value set when the filesystem was
0272 mounted, though this check is ignored in some cases. It also checks if
0273 the directory or anything below it is in use.  For symbolic links,
0274 only the `last_used` time is ever considered.
0275 
0276 If both appear to support expiring the directory or symlink, an action
0277 is taken.
0278 
0279 There are two ways to ask autofs to consider expiry.  The first is to
0280 use the **AUTOFS_IOC_EXPIRE** ioctl.  This only works for indirect
0281 mounts.  If it finds something in the root directory to expire it will
0282 return the name of that thing.  Once a name has been returned the
0283 automount daemon needs to unmount any filesystems mounted below the
0284 name normally.  As described above, this is unsafe for non-toplevel
0285 mounts in a version-5 autofs.  For this reason the current `automount(8)`
0286 does not use this ioctl.
0287 
0288 The second mechanism uses either the **AUTOFS_DEV_IOCTL_EXPIRE_CMD** or
0289 the **AUTOFS_IOC_EXPIRE_MULTI** ioctl.  This will work for both direct and
0290 indirect mounts.  If it selects an object to expire, it will notify
0291 the daemon using the notification mechanism described below.  This
0292 will block until the daemon acknowledges the expiry notification.
0293 This implies that the "`EXPIRE`" ioctl must be sent from a different
0294 thread than the one which handles notification.
0295 
0296 While the ioctl is blocking, the entry is marked as "expiring" and
0297 `d_manage` will block until the daemon affirms that the unmount has
0298 completed (together with removing any directories that might have been
0299 necessary), or has been aborted.
0300 
0301 Communicating with autofs: detecting the daemon
0302 ===============================================
0303 
0304 There are several forms of communication between the automount daemon
0305 and the filesystem.  As we have already seen, the daemon can create and
0306 remove directories and symlinks using normal filesystem operations.
0307 autofs knows whether a process requesting some operation is the daemon
0308 or not based on its process-group id number (see getpgid(1)).
0309 
0310 When an autofs filesystem is mounted the pgid of the mounting
0311 processes is recorded unless the "pgrp=" option is given, in which
0312 case that number is recorded instead.  Any request arriving from a
0313 process in that process group is considered to come from the daemon.
0314 If the daemon ever has to be stopped and restarted a new pgid can be
0315 provided through an ioctl as will be described below.
0316 
0317 Communicating with autofs: the event pipe
0318 =========================================
0319 
0320 When an autofs filesystem is mounted, the 'write' end of a pipe must
0321 be passed using the 'fd=' mount option.  autofs will write
0322 notification messages to this pipe for the daemon to respond to.
0323 For version 5, the format of the message is::
0324 
0325         struct autofs_v5_packet {
0326                 struct autofs_packet_hdr hdr;
0327                 autofs_wqt_t wait_queue_token;
0328                 __u32 dev;
0329                 __u64 ino;
0330                 __u32 uid;
0331                 __u32 gid;
0332                 __u32 pid;
0333                 __u32 tgid;
0334                 __u32 len;
0335                 char name[NAME_MAX+1];
0336         };
0337 
0338 And the format of the header is::
0339 
0340         struct autofs_packet_hdr {
0341                 int proto_version;              /* Protocol version */
0342                 int type;                       /* Type of packet */
0343         };
0344 
0345 where the type is one of ::
0346 
0347         autofs_ptype_missing_indirect
0348         autofs_ptype_expire_indirect
0349         autofs_ptype_missing_direct
0350         autofs_ptype_expire_direct
0351 
0352 so messages can indicate that a name is missing (something tried to
0353 access it but it isn't there) or that it has been selected for expiry.
0354 
0355 The pipe will be set to "packet mode" (equivalent to passing
0356 `O_DIRECT`) to _pipe2(2)_ so that a read from the pipe will return at
0357 most one packet, and any unread portion of a packet will be discarded.
0358 
0359 The `wait_queue_token` is a unique number which can identify a
0360 particular request to be acknowledged.  When a message is sent over
0361 the pipe the affected dentry is marked as either "active" or
0362 "expiring" and other accesses to it block until the message is
0363 acknowledged using one of the ioctls below with the relevant
0364 `wait_queue_token`.
0365 
0366 Communicating with autofs: root directory ioctls
0367 ================================================
0368 
0369 The root directory of an autofs filesystem will respond to a number of
0370 ioctls.  The process issuing the ioctl must have the CAP_SYS_ADMIN
0371 capability, or must be the automount daemon.
0372 
0373 The available ioctl commands are:
0374 
0375 - **AUTOFS_IOC_READY**:
0376         a notification has been handled.  The argument
0377         to the ioctl command is the "wait_queue_token" number
0378         corresponding to the notification being acknowledged.
0379 - **AUTOFS_IOC_FAIL**:
0380         similar to above, but indicates failure with
0381         the error code `ENOENT`.
0382 - **AUTOFS_IOC_CATATONIC**:
0383         Causes the autofs to enter "catatonic"
0384         mode meaning that it stops sending notifications to the daemon.
0385         This mode is also entered if a write to the pipe fails.
0386 - **AUTOFS_IOC_PROTOVER**:
0387         This returns the protocol version in use.
0388 - **AUTOFS_IOC_PROTOSUBVER**:
0389         Returns the protocol sub-version which
0390         is really a version number for the implementation.
0391 - **AUTOFS_IOC_SETTIMEOUT**:
0392         This passes a pointer to an unsigned
0393         long.  The value is used to set the timeout for expiry, and
0394         the current timeout value is stored back through the pointer.
0395 - **AUTOFS_IOC_ASKUMOUNT**:
0396         Returns, in the pointed-to `int`, 1 if
0397         the filesystem could be unmounted.  This is only a hint as
0398         the situation could change at any instant.  This call can be
0399         used to avoid a more expensive full unmount attempt.
0400 - **AUTOFS_IOC_EXPIRE**:
0401         as described above, this asks if there is
0402         anything suitable to expire.  A pointer to a packet::
0403 
0404                 struct autofs_packet_expire_multi {
0405                         struct autofs_packet_hdr hdr;
0406                         autofs_wqt_t wait_queue_token;
0407                         int len;
0408                         char name[NAME_MAX+1];
0409                 };
0410 
0411         is required.  This is filled in with the name of something
0412         that can be unmounted or removed.  If nothing can be expired,
0413         `errno` is set to `EAGAIN`.  Even though a `wait_queue_token`
0414         is present in the structure, no "wait queue" is established
0415         and no acknowledgment is needed.
0416 - **AUTOFS_IOC_EXPIRE_MULTI**:
0417         This is similar to
0418         **AUTOFS_IOC_EXPIRE** except that it causes notification to be
0419         sent to the daemon, and it blocks until the daemon acknowledges.
0420         The argument is an integer which can contain two different flags.
0421 
0422         **AUTOFS_EXP_IMMEDIATE** causes `last_used` time to be ignored
0423         and objects are expired if the are not in use.
0424 
0425         **AUTOFS_EXP_FORCED** causes the in use status to be ignored
0426         and objects are expired ieven if they are in use. This assumes
0427         that the daemon has requested this because it is capable of
0428         performing the umount.
0429 
0430         **AUTOFS_EXP_LEAVES** will select a leaf rather than a top-level
0431         name to expire.  This is only safe when *maxproto* is 4.
0432 
0433 Communicating with autofs: char-device ioctls
0434 =============================================
0435 
0436 It is not always possible to open the root of an autofs filesystem,
0437 particularly a *direct* mounted filesystem.  If the automount daemon
0438 is restarted there is no way for it to regain control of existing
0439 mounts using any of the above communication channels.  To address this
0440 need there is a "miscellaneous" character device (major 10, minor 235)
0441 which can be used to communicate directly with the autofs filesystem.
0442 It requires CAP_SYS_ADMIN for access.
0443 
0444 The 'ioctl's that can be used on this device are described in a separate
0445 document `autofs-mount-control.txt`, and are summarised briefly here.
0446 Each ioctl is passed a pointer to an `autofs_dev_ioctl` structure::
0447 
0448         struct autofs_dev_ioctl {
0449                 __u32 ver_major;
0450                 __u32 ver_minor;
0451                 __u32 size;             /* total size of data passed in
0452                                          * including this struct */
0453                 __s32 ioctlfd;          /* automount command fd */
0454 
0455                 /* Command parameters */
0456                 union {
0457                         struct args_protover            protover;
0458                         struct args_protosubver         protosubver;
0459                         struct args_openmount           openmount;
0460                         struct args_ready               ready;
0461                         struct args_fail                fail;
0462                         struct args_setpipefd           setpipefd;
0463                         struct args_timeout             timeout;
0464                         struct args_requester           requester;
0465                         struct args_expire              expire;
0466                         struct args_askumount           askumount;
0467                         struct args_ismountpoint        ismountpoint;
0468                 };
0469 
0470                 char path[0];
0471         };
0472 
0473 For the **OPEN_MOUNT** and **IS_MOUNTPOINT** commands, the target
0474 filesystem is identified by the `path`.  All other commands identify
0475 the filesystem by the `ioctlfd` which is a file descriptor open on the
0476 root, and which can be returned by **OPEN_MOUNT**.
0477 
0478 The `ver_major` and `ver_minor` are in/out parameters which check that
0479 the requested version is supported, and report the maximum version
0480 that the kernel module can support.
0481 
0482 Commands are:
0483 
0484 - **AUTOFS_DEV_IOCTL_VERSION_CMD**:
0485         does nothing, except validate and
0486         set version numbers.
0487 - **AUTOFS_DEV_IOCTL_OPENMOUNT_CMD**:
0488         return an open file descriptor
0489         on the root of an autofs filesystem.  The filesystem is identified
0490         by name and device number, which is stored in `openmount.devid`.
0491         Device numbers for existing filesystems can be found in
0492         `/proc/self/mountinfo`.
0493 - **AUTOFS_DEV_IOCTL_CLOSEMOUNT_CMD**:
0494         same as `close(ioctlfd)`.
0495 - **AUTOFS_DEV_IOCTL_SETPIPEFD_CMD**:
0496         if the filesystem is in
0497         catatonic mode, this can provide the write end of a new pipe
0498         in `setpipefd.pipefd` to re-establish communication with a daemon.
0499         The process group of the calling process is used to identify the
0500         daemon.
0501 - **AUTOFS_DEV_IOCTL_REQUESTER_CMD**:
0502         `path` should be a
0503         name within the filesystem that has been auto-mounted on.
0504         On successful return, `requester.uid` and `requester.gid` will be
0505         the UID and GID of the process which triggered that mount.
0506 - **AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD**:
0507         Check if path is a
0508         mountpoint of a particular type - see separate documentation for
0509         details.
0510 
0511 - **AUTOFS_DEV_IOCTL_PROTOVER_CMD**
0512 - **AUTOFS_DEV_IOCTL_PROTOSUBVER_CMD**
0513 - **AUTOFS_DEV_IOCTL_READY_CMD**
0514 - **AUTOFS_DEV_IOCTL_FAIL_CMD**
0515 - **AUTOFS_DEV_IOCTL_CATATONIC_CMD**
0516 - **AUTOFS_DEV_IOCTL_TIMEOUT_CMD**
0517 - **AUTOFS_DEV_IOCTL_EXPIRE_CMD**
0518 - **AUTOFS_DEV_IOCTL_ASKUMOUNT_CMD**
0519 
0520 These all have the same
0521 function as the similarly named **AUTOFS_IOC** ioctls, except
0522 that **FAIL** can be given an explicit error number in `fail.status`
0523 instead of assuming `ENOENT`, and this **EXPIRE** command
0524 corresponds to **AUTOFS_IOC_EXPIRE_MULTI**.
0525 
0526 Catatonic mode
0527 ==============
0528 
0529 As mentioned, an autofs mount can enter "catatonic" mode.  This
0530 happens if a write to the notification pipe fails, or if it is
0531 explicitly requested by an `ioctl`.
0532 
0533 When entering catatonic mode, the pipe is closed and any pending
0534 notifications are acknowledged with the error `ENOENT`.
0535 
0536 Once in catatonic mode attempts to access non-existing names will
0537 result in `ENOENT` while attempts to access existing directories will
0538 be treated in the same way as if they came from the daemon, so mount
0539 traps will not fire.
0540 
0541 When the filesystem is mounted a _uid_ and _gid_ can be given which
0542 set the ownership of directories and symbolic links.  When the
0543 filesystem is in catatonic mode, any process with a matching UID can
0544 create directories or symlinks in the root directory, but not in other
0545 directories.
0546 
0547 Catatonic mode can only be left via the
0548 **AUTOFS_DEV_IOCTL_OPENMOUNT_CMD** ioctl on the `/dev/autofs`.
0549 
0550 The "ignore" mount option
0551 =========================
0552 
0553 The "ignore" mount option can be used to provide a generic indicator
0554 to applications that the mount entry should be ignored when displaying
0555 mount information.
0556 
0557 In other OSes that provide autofs and that provide a mount list to user
0558 space based on the kernel mount list a no-op mount option ("ignore" is
0559 the one use on the most common OSes) is allowed so that autofs file
0560 system users can optionally use it.
0561 
0562 This is intended to be used by user space programs to exclude autofs
0563 mounts from consideration when reading the mounts list.
0564 
0565 autofs, name spaces, and shared mounts
0566 ======================================
0567 
0568 With bind mounts and name spaces it is possible for an autofs
0569 filesystem to appear at multiple places in one or more filesystem
0570 name spaces.  For this to work sensibly, the autofs filesystem should
0571 always be mounted "shared". e.g. ::
0572 
0573         mount --make-shared /autofs/mount/point
0574 
0575 The automount daemon is only able to manage a single mount location for
0576 an autofs filesystem and if mounts on that are not 'shared', other
0577 locations will not behave as expected.  In particular access to those
0578 other locations will likely result in the `ELOOP` error ::
0579 
0580         Too many levels of symbolic links