提交 0746aec3 编写于 作者: B Borislav Petkov 提交者: Linus Torvalds

update description in Documentation/filesystems/vfs.txt

Update the description of struct file_system_type and get_sb() in
Documentation/filesystems/vfs.txt to match the current code.
Signed-off-by: NBorislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 132e4b0a
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Original author: Richard Gooch <rgooch@atnf.csiro.au> Original author: Richard Gooch <rgooch@atnf.csiro.au>
Last updated on October 28, 2005 Last updated on June 24, 2007.
Copyright (C) 1999 Richard Gooch Copyright (C) 1999 Richard Gooch
Copyright (C) 2005 Pekka Enberg Copyright (C) 2005 Pekka Enberg
...@@ -107,7 +107,7 @@ file /proc/filesystems. ...@@ -107,7 +107,7 @@ file /proc/filesystems.
struct file_system_type struct file_system_type
----------------------- -----------------------
This describes the filesystem. As of kernel 2.6.13, the following This describes the filesystem. As of kernel 2.6.22, the following
members are defined: members are defined:
struct file_system_type { struct file_system_type {
...@@ -119,6 +119,8 @@ struct file_system_type { ...@@ -119,6 +119,8 @@ struct file_system_type {
struct module *owner; struct module *owner;
struct file_system_type * next; struct file_system_type * next;
struct list_head fs_supers; struct list_head fs_supers;
struct lock_class_key s_lock_key;
struct lock_class_key s_umount_key;
}; };
name: the name of the filesystem type, such as "ext2", "iso9660", name: the name of the filesystem type, such as "ext2", "iso9660",
...@@ -137,11 +139,12 @@ struct file_system_type { ...@@ -137,11 +139,12 @@ struct file_system_type {
next: for internal VFS use: you should initialize this to NULL next: for internal VFS use: you should initialize this to NULL
s_lock_key, s_umount_key: lockdep-specific
The get_sb() method has the following arguments: The get_sb() method has the following arguments:
struct super_block *sb: the superblock structure. This is partially struct file_system_type *fs_type: decribes the filesystem, partly initialized
initialized by the VFS and the rest must be initialized by the by the specific filesystem code
get_sb() method
int flags: mount flags int flags: mount flags
...@@ -150,12 +153,13 @@ The get_sb() method has the following arguments: ...@@ -150,12 +153,13 @@ The get_sb() method has the following arguments:
void *data: arbitrary mount options, usually comes as an ASCII void *data: arbitrary mount options, usually comes as an ASCII
string string
int silent: whether or not to be silent on error struct vfsmount *mnt: a vfs-internal representation of a mount point
The get_sb() method must determine if the block device specified The get_sb() method must determine if the block device specified
in the superblock contains a filesystem of the type the method in the dev_name and fs_type contains a filesystem of the type the method
supports. On success the method returns the superblock pointer, on supports. If it succeeds in opening the named block device, it initializes a
failure it returns NULL. struct super_block descriptor for the filesystem contained by the block device.
On failure it returns an error.
The most interesting member of the superblock structure that the The most interesting member of the superblock structure that the
get_sb() method fills in is the "s_op" field. This is a pointer to get_sb() method fills in is the "s_op" field. This is a pointer to
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册