Lines Matching +full:directory +full:- +full:based

2 autofs - how it works
8 The goal of autofs is to provide on-demand mounting and race free
17 media with a media-changing robot.
23 filesystem can even be programmatic rather than database-backed,
24 allowing wildcards for example, and can vary based on the user who
31 There also needs to be a user-space program which looks up names
35 required with any user-space program. Subsequent text refers to this
52 directory should be a mount trap is based on a master map. This master
58 mount is considered to be *indirect*), then the root directory is
59 always a regular directory, otherwise it is a mount trap when it is
60 empty and a regular directory when not empty. Note that *direct* and
62 directory is a mount trap only if the filesystem is mounted *direct*
65 Directories created in the root directory are mount traps only if the
75 So: non-empty (i.e. non-leaf) directories are never mount traps. Empty
84 which are provided by the Linux VFS. Any directory provided by a
92 (potentially) a mount trap. Any access to this directory beyond a
93 "`stat`" will (normally) cause the `d_op->d_automount()` dentry operation
95 should be mounted on the directory and to return it. The VFS is
97 directory.
109 mounting onto a directory is considered to be "beyond a `stat`", the
111 directory without some way to avoid getting caught in the trap. For
117 related behaviours are invoked, both using the `d_op->d_manage()`
121 directory, d_manage() will be called with the `rcu_walk` parameter set
124 - A return value of zero indicates that there is nothing special
132 - A return value of `-EISDIR` tells the VFS to ignore any mounts
133 on the directory and to not consider calling `->d_automount()`.
135 causing the directory not be a mount trap after all.
147 first. This means that d_manage cannot *always* return -EISDIR for
151 `d_manage` also returns `-EISDIR` if the dentry shouldn't be a
155 - Any other negative value is treated as an error and returned
160 - -ENOENT if the automount daemon failed to mount anything,
161 - -ENOMEM if it ran out of memory,
162 - -EINTR if a signal arrived while waiting for expiry to
164 - or any other error sent down by the automount daemon.
167 The second use case only occurs during an "RCU-walk" and so `rcu_walk`
170 An RCU-walk is a fast and lightweight process for walking down a
171 filename path (i.e. it is like running on tip-toes). RCU-walk cannot
173 to "REF-walk", which is slower but more robust.
175 RCU-walk will never call `->d_automount`; the filesystems must already
176 be mounted or RCU-walk cannot handle the path.
177 To determine if a mount-trap is safe for RCU-walk mode it calls
178 `->d_manage()` with `rcu_walk` set to `true`.
182 would be safe to follow down into any mounted directory and the only
186 In the `rcu_walk` case, `d_manage()` cannot return -EISDIR to tell the
187 VFS that this is a directory that doesn't require d_automount. If
189 mounted, it *will* fall back to REF-walk. `d_manage()` cannot make the
190 VFS remain in RCU-walk mode, but can only tell it to get out of
191 RCU-walk mode by returning `-ECHILD`.
194 -ECHILD if there is any reason to believe it is unsafe to enter the
197 autofs will return `-ECHILD` if an expiry of the filesystem has been
218 recently used. This allows individual names in the autofs directory
226 will trigger normal auto-mount processing. In particular, `rmdir` and
228 filesystem would, so an attempt to access a recently-removed object is
231 With version 5, this is not safe except for unmounting from top-level
232 directories. As lower-level directories are never mount traps, other
233 processes will see an empty directory as soon as the filesystem is
239 time stamp on each directory or symlink. For symlinks it genuinely
244 process working directory) and during path walks. The update done
247 access or an application frequently scans an autofs directory tree
256 considers if the entire mount-tree can be unmounted or not. For an
258 directory to determine if any of those can be unmounted and cleaned
262 that has been mounted on instead of considering the top-level names.
270 When autofs considers a directory it checks the `last_used` time and
273 the directory or anything below it is in use. For symbolic links,
276 If both appear to support expiring the directory or symlink, an action
281 mounts. If it finds something in the root directory to expire it will
284 name normally. As described above, this is unsafe for non-toplevel
285 mounts in a version-5 autofs. For this reason the current `automount(8)`
308 or not based on its process-group id number (see getpgid(1)).
366 Communicating with autofs: root directory ioctls
369 The root directory of an autofs filesystem will respond to a number of
375 - **AUTOFS_IOC_READY**:
379 - **AUTOFS_IOC_FAIL**:
382 - **AUTOFS_IOC_CATATONIC**:
386 - **AUTOFS_IOC_PROTOVER**:
388 - **AUTOFS_IOC_PROTOSUBVER**:
389 Returns the protocol sub-version which
391 - **AUTOFS_IOC_SETTIMEOUT**:
395 - **AUTOFS_IOC_ASKUMOUNT**:
396 Returns, in the pointed-to `int`, 1 if
400 - **AUTOFS_IOC_EXPIRE**:
416 - **AUTOFS_IOC_EXPIRE_MULTI**:
430 **AUTOFS_EXP_LEAVES** will select a leaf rather than a top-level
433 Communicating with autofs: char-device ioctls
445 document `autofs-mount-control.txt`, and are summarised briefly here.
484 - **AUTOFS_DEV_IOCTL_VERSION_CMD**:
487 - **AUTOFS_DEV_IOCTL_OPENMOUNT_CMD**:
493 - **AUTOFS_DEV_IOCTL_CLOSEMOUNT_CMD**:
495 - **AUTOFS_DEV_IOCTL_SETPIPEFD_CMD**:
498 in `setpipefd.pipefd` to re-establish communication with a daemon.
501 - **AUTOFS_DEV_IOCTL_REQUESTER_CMD**:
503 name within the filesystem that has been auto-mounted on.
506 - **AUTOFS_DEV_IOCTL_ISMOUNTPOINT_CMD**:
508 mountpoint of a particular type - see separate documentation for
511 - **AUTOFS_DEV_IOCTL_PROTOVER_CMD**
512 - **AUTOFS_DEV_IOCTL_PROTOSUBVER_CMD**
513 - **AUTOFS_DEV_IOCTL_READY_CMD**
514 - **AUTOFS_DEV_IOCTL_FAIL_CMD**
515 - **AUTOFS_DEV_IOCTL_CATATONIC_CMD**
516 - **AUTOFS_DEV_IOCTL_TIMEOUT_CMD**
517 - **AUTOFS_DEV_IOCTL_EXPIRE_CMD**
518 - **AUTOFS_DEV_IOCTL_ASKUMOUNT_CMD**
536 Once in catatonic mode attempts to access non-existing names will
544 create directories or symlinks in the root directory, but not in other
558 space based on the kernel mount list a no-op mount option ("ignore" is
573 mount --make-shared /autofs/mount/point