Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: filesystems: vfs: actualize struct file_system_type description

Added descriptions for:
- fscontext API ('init_fs_context' method, 'parameters' field)
- 'fs_supers' field

Cc: Eric Biggers <ebiggers@kernel.org>
Cc: Miklos Szeredi <mszeredi@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christian Brauner <brauner@kernel.org>
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Link: https://lore.kernel.org/r/20230313130718.253708-2-aleksandr.mikhalitsyn@canonical.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>

authored by

Alexander Mikhalitsyn and committed by
Jonathan Corbet
85bf9a0e d2ea66a6

+27 -4
+27 -4
Documentation/filesystems/vfs.rst
··· 107 107 struct file_system_type 108 108 ----------------------- 109 109 110 - This describes the filesystem. As of kernel 2.6.39, the following 110 + This describes the filesystem. The following 111 111 members are defined: 112 112 113 113 .. code-block:: c ··· 115 115 struct file_system_type { 116 116 const char *name; 117 117 int fs_flags; 118 + int (*init_fs_context)(struct fs_context *); 119 + const struct fs_parameter_spec *parameters; 118 120 struct dentry *(*mount) (struct file_system_type *, int, 119 - const char *, void *); 121 + const char *, void *); 120 122 void (*kill_sb) (struct super_block *); 121 123 struct module *owner; 122 124 struct file_system_type * next; 123 - struct list_head fs_supers; 125 + struct hlist_head fs_supers; 126 + 124 127 struct lock_class_key s_lock_key; 125 128 struct lock_class_key s_umount_key; 129 + struct lock_class_key s_vfs_rename_key; 130 + struct lock_class_key s_writers_key[SB_FREEZE_LEVELS]; 131 + 132 + struct lock_class_key i_lock_key; 133 + struct lock_class_key i_mutex_key; 134 + struct lock_class_key invalidate_lock_key; 135 + struct lock_class_key i_mutex_dir_key; 126 136 }; 127 137 128 138 ``name`` ··· 141 131 142 132 ``fs_flags`` 143 133 various flags (i.e. FS_REQUIRES_DEV, FS_NO_DCACHE, etc.) 134 + 135 + ``init_fs_context`` 136 + Initializes 'struct fs_context' ->ops and ->fs_private fields with 137 + filesystem-specific data. 138 + 139 + ``parameters`` 140 + Pointer to the array of filesystem parameters descriptors 141 + 'struct fs_parameter_spec'. 142 + More info in Documentation/filesystems/mount_api.rst. 144 143 145 144 ``mount`` 146 145 the method to call when a new instance of this filesystem should ··· 167 148 ``next`` 168 149 for internal VFS use: you should initialize this to NULL 169 150 170 - s_lock_key, s_umount_key: lockdep-specific 151 + ``fs_supers`` 152 + for internal VFS use: hlist of filesystem instances (superblocks) 153 + 154 + s_lock_key, s_umount_key, s_vfs_rename_key, s_writers_key, 155 + i_lock_key, i_mutex_key, invalidate_lock_key, i_mutex_dir_key: lockdep-specific 171 156 172 157 The mount() method has the following arguments: 173 158