aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/ocfs2.h
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2008-11-13 17:49:16 -0500
committerMark Fasheh <mfasheh@suse.com>2009-01-05 11:36:53 -0500
commit5e96581a377fc6bd76e9b112da9aeb8a7ae8bf22 (patch)
treece2e1d8819b6020567828ca9021438c0824aa8d4 /fs/ocfs2/ocfs2.h
parent4203530613280281868b3ca36c817530bca3825c (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/ocfs2.h')
-rw-r--r--fs/ocfs2/ocfs2.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h
index 82ba887afa0d..f04b229fc757 100644
--- a/fs/ocfs2/ocfs2.h
+++ b/fs/ocfs2/ocfs2.h
@@ -447,14 +447,6 @@ static inline int ocfs2_uses_extended_slot_map(struct ocfs2_super *osb)
447#define OCFS2_IS_VALID_EXTENT_BLOCK(ptr) \ 447#define OCFS2_IS_VALID_EXTENT_BLOCK(ptr) \
448 (!strcmp((ptr)->h_signature, OCFS2_EXTENT_BLOCK_SIGNATURE)) 448 (!strcmp((ptr)->h_signature, OCFS2_EXTENT_BLOCK_SIGNATURE))
449 449
450#define OCFS2_RO_ON_INVALID_EXTENT_BLOCK(__sb, __eb) do { \
451 typeof(__eb) ____eb = (__eb); \
452 ocfs2_error((__sb), \
453 "Extent Block # %llu has bad signature %.*s", \
454 (unsigned long long)le64_to_cpu((____eb)->h_blkno), 7, \
455 (____eb)->h_signature); \
456} while (0)
457
458#define OCFS2_IS_VALID_GROUP_DESC(ptr) \ 450#define OCFS2_IS_VALID_GROUP_DESC(ptr) \
459 (!strcmp((ptr)->bg_signature, OCFS2_GROUP_DESC_SIGNATURE)) 451 (!strcmp((ptr)->bg_signature, OCFS2_GROUP_DESC_SIGNATURE))
460 452