From: Borislav Petkov Subject: [PATCH] update description in Documentation/filesystems/vfs.txt Date: Sun, 24 Jun 2007 14:21:16 +0200 Message-ID: <20070624122116.GA8067@gollum.tnic> Reply-To: bbpetkov@yahoo.de Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Pekka Enberg Return-path: Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org While reading the said file I noticed some discrepancies between the ac= tual code and the info in the docs. Here's an update that attempts to match = it to the code in the current 2.6.22-rc5. --- =46rom: Borislav Petkov Update the description of struct file_system_type and get_sb() in Documentation/filesystems/vfs.txt to match the current code. Signed-off-by: Borislav Petkov -- Index: linux-2.6.22-rc5/Documentation/filesystems/vfs.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- linux-2.6.22-rc5/Documentation/filesystems/vfs.txt.orig 2007-06-24 = 13:42:40.000000000 +0200 +++ linux-2.6.22-rc5/Documentation/filesystems/vfs.txt 2007-06-24 14:14= :48.000000000 +0200 @@ -3,7 +3,7 @@ =20 Original author: Richard Gooch =20 - Last updated on October 28, 2005 + Last updated on Juni 24, 2007. =20 Copyright (C) 1999 Richard Gooch Copyright (C) 2005 Pekka Enberg @@ -107,7 +107,7 @@ struct file_system_type ----------------------- =20 -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: =20 struct file_system_type { @@ -119,6 +119,8 @@ struct module *owner; struct file_system_type * next; struct list_head fs_supers; + struct lock_class_key s_lock_key; + struct lock_class_key s_umount_key; }; =20 name: the name of the filesystem type, such as "ext2", "iso9660", @@ -137,11 +139,12 @@ =20 next: for internal VFS use: you should initialize this to NULL =20 + s_lock_key, s_umount_key: lockdep-specific + The get_sb() method has the following arguments: =20 - struct super_block *sb: the superblock structure. This is partially - initialized by the VFS and the rest must be initialized by the - get_sb() method + struct file_system_type *fs_type: decribes the filesystem, partly in= itialized + by the specific filesystem code =20 int flags: mount flags =20 @@ -150,12 +153,13 @@ void *data: arbitrary mount options, usually comes as an ASCII string =20 - int silent: whether or not to be silent on error + struct vfsmount *mnt: a vfs-internal representation of a mount point =20 The get_sb() method must determine if the block device specified -in the superblock contains a filesystem of the type the method -supports. On success the method returns the superblock pointer, on -failure it returns NULL. +in the dev_name and fs_type contains a filesystem of the type the meth= od +supports. If it succeeds in opening the named block device, it initial= izes a +struct super_block descriptor for the filesystem contained by the bloc= k device. +On failure it returns an error. =20 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 --=20 Regards/Gru=DF, Boris.