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

docs: filesystems: convert automount-support.txt to ReST

- Add a SPDX header;
- Add a document title;
- Adjust section titles;
- 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/ba7e2f2bf9aa2c7096772f5e7e8e609cb5fce07c.1588021877.git.mchehab+huawei@kernel.orgSigned-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 175cc46f
.. SPDX-License-Identifier: GPL-2.0
=================
Automount Support
=================
Support is available for filesystems that wish to do automounting Support is available for filesystems that wish to do automounting
support (such as kAFS which can be found in fs/afs/ and NFS in support (such as kAFS which can be found in fs/afs/ and NFS in
fs/nfs/). This facility includes allowing in-kernel mounts to be fs/nfs/). This facility includes allowing in-kernel mounts to be
...@@ -5,13 +12,12 @@ performed and mountpoint degradation to be requested. The latter can ...@@ -5,13 +12,12 @@ performed and mountpoint degradation to be requested. The latter can
also be requested by userspace. also be requested by userspace.
====================== In-Kernel Automounting
IN-KERNEL AUTOMOUNTING
====================== ======================
See section "Mount Traps" of Documentation/filesystems/autofs.rst See section "Mount Traps" of Documentation/filesystems/autofs.rst
Then from userspace, you can just do something like: Then from userspace, you can just do something like::
[root@andromeda root]# mount -t afs \#root.afs. /afs [root@andromeda root]# mount -t afs \#root.afs. /afs
[root@andromeda root]# ls /afs [root@andromeda root]# ls /afs
...@@ -21,7 +27,7 @@ Then from userspace, you can just do something like: ...@@ -21,7 +27,7 @@ Then from userspace, you can just do something like:
[root@andromeda root]# ls /afs/cambridge/afsdoc/ [root@andromeda root]# ls /afs/cambridge/afsdoc/
ChangeLog html LICENSE pdf RELNOTES-1.2.2 ChangeLog html LICENSE pdf RELNOTES-1.2.2
And then if you look in the mountpoint catalogue, you'll see something like: And then if you look in the mountpoint catalogue, you'll see something like::
[root@andromeda root]# cat /proc/mounts [root@andromeda root]# cat /proc/mounts
... ...
...@@ -30,8 +36,7 @@ And then if you look in the mountpoint catalogue, you'll see something like: ...@@ -30,8 +36,7 @@ And then if you look in the mountpoint catalogue, you'll see something like:
#afsdoc. /afs/cambridge.redhat.com/afsdoc afs rw 0 0 #afsdoc. /afs/cambridge.redhat.com/afsdoc afs rw 0 0
=========================== Automatic Mountpoint Expiry
AUTOMATIC MOUNTPOINT EXPIRY
=========================== ===========================
Automatic expiration of mountpoints is easy, provided you've mounted the Automatic expiration of mountpoints is easy, provided you've mounted the
...@@ -43,7 +48,8 @@ To do expiration, you need to follow these steps: ...@@ -43,7 +48,8 @@ To do expiration, you need to follow these steps:
hung. hung.
(2) When a new mountpoint is created in the ->d_automount method, add (2) When a new mountpoint is created in the ->d_automount method, add
the mnt to the list using mnt_set_expiry() the mnt to the list using mnt_set_expiry()::
mnt_set_expiry(newmnt, &afs_vfsmounts); mnt_set_expiry(newmnt, &afs_vfsmounts);
(3) When you want mountpoints to be expired, call mark_mounts_for_expiry() (3) When you want mountpoints to be expired, call mark_mounts_for_expiry()
...@@ -70,8 +76,7 @@ and the copies of those that are on an expiration list will be added to the ...@@ -70,8 +76,7 @@ and the copies of those that are on an expiration list will be added to the
same expiration list. same expiration list.
======================= Userspace Driven Expiry
USERSPACE DRIVEN EXPIRY
======================= =======================
As an alternative, it is possible for userspace to request expiry of any As an alternative, it is possible for userspace to request expiry of any
......
...@@ -25,6 +25,8 @@ algorithms work. ...@@ -25,6 +25,8 @@ algorithms work.
locking locking
directory-locking directory-locking
automount-support
caching/index caching/index
porting porting
......
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