Updating the documentation of struct file_system_type
Subsystems (3)
PATCH 1/1 Updating the documentation of struct file_system_type
From: Joris Gutjahr <[email protected]>
In the documentation of struct file_system_type, using the definition of the struct of the kernel v5.10-rc6.
--- Documentation/filesystems/vfs.rst | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-)
Documentation/filesystems/vfs.rst +23 -5
@@ -107,22 +107,30 @@ file /proc/filesystems. struct file_system_type ----------------------- -This describes the filesystem. As of kernel 2.6.39, the following -members are defined: +This describes the filesystem. As of kernel v5.10, the following +members are defined: (compare: include/linux/fs.h) .. code-block:: c - struct file_system_operations { + struct file_system_type { const char *name; int fs_flags; + int (*init_fs_context)(struct fs_context*); + const struct fs_parameter_spec *parameters; struct dentry *(*mount) (struct file_system_type *, int, const char *, void *); void (*kill_sb) (struct super_block *); struct module *owner; struct file_system_type * next; - struct list_head fs_supers; + struct hlist_head fs_supers; struct lock_class_key s_lock_key; struct lock_class_key s_umount_key; + struct lock_class_key s_vfs_rename_key; + struct lock_class_key s_writers_key[SB_FREEZE_LEVELS]; + + struct lock_class_key i_lock_key; + struct lock_class_key i_mutex_key; + struct lock_class_key i_mutex_dir_key; }; ``name``
@@ -132,6 +140,12 @@ members are defined: ``fs_flags`` various flags (i.e. FS_REQUIRES_DEV, FS_NO_DCACHE, etc.) +``init_fs_context`` + TODO + +``fs_parameter_spec`` + TODO + ``mount`` the method to call when a new instance of this filesystem should be mounted
@@ -148,7 +162,11 @@ members are defined: ``next`` for internal VFS use: you should initialize this to NULL - s_lock_key, s_umount_key: lockdep-specific +``fs_supers`` + TODO + + + s_lock_key, s_umount_key, s_vfs_rename_key, s_writers_key, i_lock_key, i_mutex_key, i_mutex_dir_key: lockdep-specific The mount() method has the following arguments:
Signature · 1 line
2.17.1
Jonathan Corbet
maintainerQuoted 6 lines · On Tue, 1 Dec 2020 22:05:51 +0100 [email protected] wrote:
From: Joris Gutjahr <[email protected]>
In the documentation of struct
file_system_type, using the definition of the struct of the kernel v5.10-rc6.Signed-off-by Joris Gutjahr <[email protected]>
So I applaud any effort to update this file, but I have a couple of requests. First is that any patch like this needs to be run past the filesystem folks; I've added Al and the fsdevel list to CC as a starting point.
Quoted 43 lines
Documentation/filesystems/vfs.rst | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-)Documentation/filesystems/vfs.rst +12
-4@@ -107,22 +107,30 @@ file /proc/filesystems. struct file_system_type ----------------------- -This describes the filesystem. As of kernel 2.6.39, the following -members are defined: +This describes the filesystem. As of kernel v5.10, the following +members are defined: (compare: include/linux/fs.h) .. code-block:: c - struct file_system_operations { + struct file_system_type { const char *name; int fs_flags; + int (*init_fs_context)(struct fs_context*); + const struct fs_parameter_spec *parameters; struct dentry *(*mount) (struct file_system_type *, int, const char *, void *); void (*kill_sb) (struct super_block *); struct module *owner; struct file_system_type * next; - struct list_head fs_supers; + struct hlist_head fs_supers; struct lock_class_key s_lock_key; struct lock_class_key s_umount_key; + struct lock_class_key s_vfs_rename_key; + struct lock_class_key s_writers_key[SB_FREEZE_LEVELS]; + + struct lock_class_key i_lock_key; + struct lock_class_key i_mutex_key; + struct lock_class_key i_mutex_dir_key; }; ``name``
Documentation/filesystems/vfs.rst members are defined: · line 147
Quoted 8 lines
Documentation/filesystems/vfs.rst +5
-0@@ -132,6 +140,12 @@ members are defined: ``fs_flags`` various flags (i.e. FS_REQUIRES_DEV, FS_NO_DCACHE, etc.) +``init_fs_context`` + TODO + +``fs_parameter_spec`` + TODO
These are ... not particularly helpful. If we're going to update the documentation for this structure, we should actually update the documentation, methinks.
Documentation/filesystems/vfs.rst members are defined: · line 169
Quoted 13 lines
Documentation/filesystems/vfs.rst +5
-1``mount`` the method to call when a new instance of this filesystem should be mounted@@ -148,7 +162,11 @@ members are defined: ``next`` for internal VFS use: you should initialize this to NULL - s_lock_key, s_umount_key: lockdep-specific +``fs_supers`` + TODO + + + s_lock_key, s_umount_key, s_vfs_rename_key, s_writers_key, i_lock_key, i_mutex_key, i_mutex_dir_key: lockdep-specific
You should maintain the RST description-list formatting here.
Documentation/filesystems/vfs.rst members are defined: · line 171
Quoted 1 line
Documentation/filesystems/vfs.rst +0
-0The mount() method has the following arguments:
Thanks,
jon