Commit c64d3dc6 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Jonathan Corbet

docs: filesystems: convert autofs-mount-control.txt to ReST

- Add a SPDX header;
- Adjust document title;
- Some whitespace fixes and new line breaks;
- Mark literal blocks as such;
- Add it to filesystems/index.rst.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/8cae057ae244d0f5b58d3c209bcdae5ed82bc52c.1581955849.git.mchehab+huawei@kernel.orgSigned-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent ca6e9049
.. SPDX-License-Identifier: GPL-2.0
====================================================================
Miscellaneous Device control operations for the autofs kernel module Miscellaneous Device control operations for the autofs kernel module
==================================================================== ====================================================================
...@@ -36,24 +38,24 @@ For example, there are two types of automount maps, direct (in the kernel ...@@ -36,24 +38,24 @@ For example, there are two types of automount maps, direct (in the kernel
module source you will see a third type called an offset, which is just module source you will see a third type called an offset, which is just
a direct mount in disguise) and indirect. a direct mount in disguise) and indirect.
Here is a master map with direct and indirect map entries: Here is a master map with direct and indirect map entries::
/- /etc/auto.direct /- /etc/auto.direct
/test /etc/auto.indirect /test /etc/auto.indirect
and the corresponding map files: and the corresponding map files::
/etc/auto.direct: /etc/auto.direct:
/automount/dparse/g6 budgie:/autofs/export1 /automount/dparse/g6 budgie:/autofs/export1
/automount/dparse/g1 shark:/autofs/export1 /automount/dparse/g1 shark:/autofs/export1
and so on. and so on.
/etc/auto.indirect: /etc/auto.indirect::
g1 shark:/autofs/export1 g1 shark:/autofs/export1
g6 budgie:/autofs/export1 g6 budgie:/autofs/export1
and so on. and so on.
For the above indirect map an autofs file system is mounted on /test and For the above indirect map an autofs file system is mounted on /test and
mounts are triggered for each sub-directory key by the inode lookup mounts are triggered for each sub-directory key by the inode lookup
...@@ -69,18 +71,18 @@ use the follow_link inode operation to trigger the mount. ...@@ -69,18 +71,18 @@ use the follow_link inode operation to trigger the mount.
But, each entry in direct and indirect maps can have offsets (making But, each entry in direct and indirect maps can have offsets (making
them multi-mount map entries). them multi-mount map entries).
For example, an indirect mount map entry could also be: For example, an indirect mount map entry could also be::
g1 \ g1 \
/ shark:/autofs/export5/testing/test \ / shark:/autofs/export5/testing/test \
/s1 shark:/autofs/export/testing/test/s1 \ /s1 shark:/autofs/export/testing/test/s1 \
/s2 shark:/autofs/export5/testing/test/s2 \ /s2 shark:/autofs/export5/testing/test/s2 \
/s1/ss1 shark:/autofs/export1 \ /s1/ss1 shark:/autofs/export1 \
/s2/ss2 shark:/autofs/export2 /s2/ss2 shark:/autofs/export2
and a similarly a direct mount map entry could also be: and a similarly a direct mount map entry could also be::
/automount/dparse/g1 \ /automount/dparse/g1 \
/ shark:/autofs/export5/testing/test \ / shark:/autofs/export5/testing/test \
/s1 shark:/autofs/export/testing/test/s1 \ /s1 shark:/autofs/export/testing/test/s1 \
/s2 shark:/autofs/export5/testing/test/s2 \ /s2 shark:/autofs/export5/testing/test/s2 \
...@@ -170,9 +172,9 @@ autofs Miscellaneous Device mount control interface ...@@ -170,9 +172,9 @@ autofs Miscellaneous Device mount control interface
The control interface is opening a device node, typically /dev/autofs. The control interface is opening a device node, typically /dev/autofs.
All the ioctls use a common structure to pass the needed parameter All the ioctls use a common structure to pass the needed parameter
information and return operation results: information and return operation results::
struct autofs_dev_ioctl { struct autofs_dev_ioctl {
__u32 ver_major; __u32 ver_major;
__u32 ver_minor; __u32 ver_minor;
__u32 size; /* total size of data passed in __u32 size; /* total size of data passed in
...@@ -195,7 +197,7 @@ struct autofs_dev_ioctl { ...@@ -195,7 +197,7 @@ struct autofs_dev_ioctl {
}; };
char path[0]; char path[0];
}; };
The ioctlfd field is a mount point file descriptor of an autofs mount The ioctlfd field is a mount point file descriptor of an autofs mount
point. It is returned by the open call and is used by all calls except point. It is returned by the open call and is used by all calls except
...@@ -212,7 +214,7 @@ is used account for the increased structure length when translating the ...@@ -212,7 +214,7 @@ is used account for the increased structure length when translating the
structure sent from user space. structure sent from user space.
This structure can be initialized before setting specific fields by using This structure can be initialized before setting specific fields by using
the void function call init_autofs_dev_ioctl(struct autofs_dev_ioctl *). the void function call init_autofs_dev_ioctl(``struct autofs_dev_ioctl *``).
All of the ioctls perform a copy of this structure from user space to All of the ioctls perform a copy of this structure from user space to
kernel space and return -EINVAL if the size parameter is smaller than kernel space and return -EINVAL if the size parameter is smaller than
......
...@@ -51,6 +51,7 @@ Documentation for filesystem implementations. ...@@ -51,6 +51,7 @@ Documentation for filesystem implementations.
affs affs
afs afs
autofs autofs
autofs-mount-control
fuse fuse
overlayfs overlayfs
virtiofs virtiofs
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment