aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems/vfs.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/filesystems/vfs.txt')
-rw-r--r--Documentation/filesystems/vfs.txt50
1 files changed, 47 insertions, 3 deletions
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
index bd55038b56f5..81e5be6e6e35 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -151,7 +151,7 @@ The get_sb() method has the following arguments:
151 const char *dev_name: the device name we are mounting. 151 const char *dev_name: the device name we are mounting.
152 152
153 void *data: arbitrary mount options, usually comes as an ASCII 153 void *data: arbitrary mount options, usually comes as an ASCII
154 string 154 string (see "Mount Options" section)
155 155
156 struct vfsmount *mnt: a vfs-internal representation of a mount point 156 struct vfsmount *mnt: a vfs-internal representation of a mount point
157 157
@@ -182,7 +182,7 @@ A fill_super() method implementation has the following arguments:
182 must initialize this properly. 182 must initialize this properly.
183 183
184 void *data: arbitrary mount options, usually comes as an ASCII 184 void *data: arbitrary mount options, usually comes as an ASCII
185 string 185 string (see "Mount Options" section)
186 186
187 int silent: whether or not to be silent on error 187 int silent: whether or not to be silent on error
188 188
@@ -291,7 +291,8 @@ or bottom half).
291 291
292 umount_begin: called when the VFS is unmounting a filesystem. 292 umount_begin: called when the VFS is unmounting a filesystem.
293 293
294 show_options: called by the VFS to show mount options for /proc/<pid>/mounts. 294 show_options: called by the VFS to show mount options for
295 /proc/<pid>/mounts. (see "Mount Options" section)
295 296
296 quota_read: called by the VFS to read from filesystem quota file. 297 quota_read: called by the VFS to read from filesystem quota file.
297 298
@@ -969,6 +970,49 @@ manipulate dentries:
969For further information on dentry locking, please refer to the document 970For further information on dentry locking, please refer to the document
970Documentation/filesystems/dentry-locking.txt. 971Documentation/filesystems/dentry-locking.txt.
971 972
973Mount Options
974=============
975
976Parsing options
977---------------
978
979On mount and remount the filesystem is passed a string containing a
980comma separated list of mount options. The options can have either of
981these forms:
982
983 option
984 option=value
985
986The <linux/parser.h> header defines an API that helps parse these
987options. There are plenty of examples on how to use it in existing
988filesystems.
989
990Showing options
991---------------
992
993If a filesystem accepts mount options, it must define show_options()
994to show all the currently active options. The rules are:
995
996 - options MUST be shown which are not default or their values differ
997 from the default
998
999 - options MAY be shown which are enabled by default or have their
1000 default value
1001
1002Options used only internally between a mount helper and the kernel
1003(such as file descriptors), or which only have an effect during the
1004mounting (such as ones controlling the creation of a journal) are exempt
1005from the above rules.
1006
1007The underlying reason for the above rules is to make sure, that a
1008mount can be accurately replicated (e.g. umounting and mounting again)
1009based on the information found in /proc/mounts.
1010
1011A simple method of saving options at mount/remount time and showing
1012them is provided with the save_mount_options() and
1013generic_show_options() helper functions. Please note, that using
1014these may have drawbacks. For more info see header comments for these
1015functions in fs/namespace.c.
972 1016
973Resources 1017Resources
974========= 1018=========