diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2006-11-30 10:02:19 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-11-30 10:37:40 -0500 |
commit | aac1a3c77a46c2d06f297641760dd740ac2a84af (patch) | |
tree | d56f7891ece4ccbd72dd2a86ed1f613f8a302e0c /fs | |
parent | 0da3585e1ef650d3224b4d6f9799558d1d99fa1e (diff) |
[GFS2] Add a comment about reading the super block
The comment explains why we use the bio functions to read
the super block.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Cc: Andrew Morton <akpm@osdl.org>
Cc: Srinivasa Ds <srinivasa@in.ibm.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/gfs2/super.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index 3b2272742796..43a24f2e5905 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c | |||
@@ -180,6 +180,24 @@ static int end_bio_io_page(struct bio *bio, unsigned int bytes_done, int error) | |||
180 | return 0; | 180 | return 0; |
181 | } | 181 | } |
182 | 182 | ||
183 | /** | ||
184 | * gfs2_read_super - Read the gfs2 super block from disk | ||
185 | * @sb: The VFS super block | ||
186 | * @sector: The location of the super block | ||
187 | * | ||
188 | * This uses the bio functions to read the super block from disk | ||
189 | * because we want to be 100% sure that we never read cached data. | ||
190 | * A super block is read twice only during each GFS2 mount and is | ||
191 | * never written to by the filesystem. The first time its read no | ||
192 | * locks are held, and the only details which are looked at are those | ||
193 | * relating to the locking protocol. Once locking is up and working, | ||
194 | * the sb is read again under the lock to establish the location of | ||
195 | * the master directory (contains pointers to journals etc) and the | ||
196 | * root directory. | ||
197 | * | ||
198 | * Returns: A page containing the sb or NULL | ||
199 | */ | ||
200 | |||
183 | struct page *gfs2_read_super(struct super_block *sb, sector_t sector) | 201 | struct page *gfs2_read_super(struct super_block *sb, sector_t sector) |
184 | { | 202 | { |
185 | struct page *page; | 203 | struct page *page; |