diff options
author | Joel Becker <joel.becker@oracle.com> | 2008-11-13 17:49:16 -0500 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2009-01-05 11:36:53 -0500 |
commit | 5e96581a377fc6bd76e9b112da9aeb8a7ae8bf22 (patch) | |
tree | ce2e1d8819b6020567828ca9021438c0824aa8d4 /fs/ocfs2/alloc.h | |
parent | 4203530613280281868b3ca36c817530bca3825c (diff) |
ocfs2: Wrap extent block reads in a dedicated function.
We weren't consistently checking extent blocks after we read them.
Most places checked the signature, but none checked h_blkno or
h_fs_signature. Create a toplevel ocfs2_read_extent_block() that does
the read and the validation.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/alloc.h')
-rw-r--r-- | fs/ocfs2/alloc.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/ocfs2/alloc.h b/fs/ocfs2/alloc.h index 0fbf8fc55a49..59d37d1b7d4c 100644 --- a/fs/ocfs2/alloc.h +++ b/fs/ocfs2/alloc.h | |||
@@ -73,6 +73,14 @@ void ocfs2_init_xattr_value_extent_tree(struct ocfs2_extent_tree *et, | |||
73 | struct buffer_head *bh, | 73 | struct buffer_head *bh, |
74 | struct ocfs2_xattr_value_root *xv); | 74 | struct ocfs2_xattr_value_root *xv); |
75 | 75 | ||
76 | /* | ||
77 | * Read an extent block into *bh. If *bh is NULL, a bh will be | ||
78 | * allocated. This is a cached read. The extent block will be validated | ||
79 | * with ocfs2_validate_extent_block(). | ||
80 | */ | ||
81 | int ocfs2_read_extent_block(struct inode *inode, u64 eb_blkno, | ||
82 | struct buffer_head **bh); | ||
83 | |||
76 | struct ocfs2_alloc_context; | 84 | struct ocfs2_alloc_context; |
77 | int ocfs2_insert_extent(struct ocfs2_super *osb, | 85 | int ocfs2_insert_extent(struct ocfs2_super *osb, |
78 | handle_t *handle, | 86 | handle_t *handle, |