]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - Documentation/filesystems/vfs.txt
Linux 2.6.27
[linux-2.6-omap-h63xx.git] / Documentation / filesystems / vfs.txt
index bd55038b56f5464df637c618abe0a06318f39e72..c4d348dabe9499454055ebff41fb88ef71346dda 100644 (file)
@@ -143,7 +143,7 @@ struct file_system_type {
 
 The get_sb() method has the following arguments:
 
-  struct file_system_type *fs_type: decribes the filesystem, partly initialized
+  struct file_system_type *fs_type: describes the filesystem, partly initialized
        by the specific filesystem code
 
   int flags: mount flags
@@ -151,7 +151,7 @@ The get_sb() method has the following arguments:
   const char *dev_name: the device name we are mounting.
 
   void *data: arbitrary mount options, usually comes as an ASCII
-       string
+       string (see "Mount Options" section)
 
   struct vfsmount *mnt: a vfs-internal representation of a mount point
 
@@ -182,7 +182,7 @@ A fill_super() method implementation has the following arguments:
        must initialize this properly.
 
   void *data: arbitrary mount options, usually comes as an ASCII
-       string
+       string (see "Mount Options" section)
 
   int silent: whether or not to be silent on error
 
@@ -205,7 +205,6 @@ struct super_operations {
 
         void (*dirty_inode) (struct inode *);
         int (*write_inode) (struct inode *, int);
-        void (*put_inode) (struct inode *);
         void (*drop_inode) (struct inode *);
         void (*delete_inode) (struct inode *);
         void (*put_super) (struct super_block *);
@@ -246,9 +245,6 @@ or bottom half).
        inode to disc.  The second parameter indicates whether the write
        should be synchronous or not, not all filesystems check this flag.
 
-  put_inode: called when the VFS inode is removed from the inode
-       cache.
-
   drop_inode: called when the last access to the inode is dropped,
        with the inode_lock spinlock held.
 
@@ -291,7 +287,8 @@ or bottom half).
 
   umount_begin: called when the VFS is unmounting a filesystem.
 
-  show_options: called by the VFS to show mount options for /proc/<pid>/mounts.
+  show_options: called by the VFS to show mount options for
+       /proc/<pid>/mounts.  (see "Mount Options" section)
 
   quota_read: called by the VFS to read from filesystem quota file.
 
@@ -898,9 +895,9 @@ struct dentry_operations {
        iput() yourself
 
   d_dname: called when the pathname of a dentry should be generated.
-       Usefull for some pseudo filesystems (sockfs, pipefs, ...) to delay
+       Useful for some pseudo filesystems (sockfs, pipefs, ...) to delay
        pathname generation. (Instead of doing it when dentry is created,
-       its done only when the path is needed.). Real filesystems probably
+       it's done only when the path is needed.). Real filesystems probably
        dont want to use it, because their dentries are present in global
        dcache hash, so their hash should be an invariant. As no lock is
        held, d_dname() should not try to modify the dentry itself, unless
@@ -969,6 +966,49 @@ manipulate dentries:
 For further information on dentry locking, please refer to the document
 Documentation/filesystems/dentry-locking.txt.
 
+Mount Options
+=============
+
+Parsing options
+---------------
+
+On mount and remount the filesystem is passed a string containing a
+comma separated list of mount options.  The options can have either of
+these forms:
+
+  option
+  option=value
+
+The <linux/parser.h> header defines an API that helps parse these
+options.  There are plenty of examples on how to use it in existing
+filesystems.
+
+Showing options
+---------------
+
+If a filesystem accepts mount options, it must define show_options()
+to show all the currently active options.  The rules are:
+
+  - options MUST be shown which are not default or their values differ
+    from the default
+
+  - options MAY be shown which are enabled by default or have their
+    default value
+
+Options used only internally between a mount helper and the kernel
+(such as file descriptors), or which only have an effect during the
+mounting (such as ones controlling the creation of a journal) are exempt
+from the above rules.
+
+The underlying reason for the above rules is to make sure, that a
+mount can be accurately replicated (e.g. umounting and mounting again)
+based on the information found in /proc/mounts.
+
+A simple method of saving options at mount/remount time and showing
+them is provided with the save_mount_options() and
+generic_show_options() helper functions.  Please note, that using
+these may have drawbacks.  For more info see header comments for these
+functions in fs/namespace.c.
 
 Resources
 =========