aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/ocfs2.h
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2008-10-16 20:54:25 -0400
committerMark Fasheh <mfasheh@suse.com>2009-01-05 11:40:31 -0500
commit70ad1ba7b48364d758a112df0823edc5ca6632aa (patch)
tree0ec30f4a812c1e66e3e3e7457eca1db8a451549a /fs/ocfs2/ocfs2.h
parentab552d54673f262d7f70014003d3928d29270f22 (diff)
ocfs2: Add the underlying blockcheck code.
This is the code that computes crc32 and ecc for ocfs2 metadata blocks. There are high-level functions that check whether the filesystem has the ecc feature, mid-level functions that work on a single block or array of buffer_heads, and the low-level ecc hamming code that can handle multiple buffers like crc32_le(). It's not hooked up to the filesystem yet. Signed-off-by: Joel Becker <joel.becker@oracle.com> Cc: Christoph Hellwig <hch@lst.de> 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, 8 insertions, 0 deletions
diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h
index 5c777988042f..2bb389fe7397 100644
--- a/fs/ocfs2/ocfs2.h
+++ b/fs/ocfs2/ocfs2.h
@@ -382,6 +382,13 @@ static inline int ocfs2_supports_xattr(struct ocfs2_super *osb)
382 return 0; 382 return 0;
383} 383}
384 384
385static inline int ocfs2_meta_ecc(struct ocfs2_super *osb)
386{
387 if (osb->s_feature_incompat & OCFS2_FEATURE_INCOMPAT_META_ECC)
388 return 1;
389 return 0;
390}
391
385/* set / clear functions because cluster events can make these happen 392/* set / clear functions because cluster events can make these happen
386 * in parallel so we want the transitions to be atomic. this also 393 * in parallel so we want the transitions to be atomic. this also
387 * means that any future flags osb_flags must be protected by spinlock 394 * means that any future flags osb_flags must be protected by spinlock
@@ -615,5 +622,6 @@ static inline s16 ocfs2_get_inode_steal_slot(struct ocfs2_super *osb)
615#define ocfs2_clear_bit ext2_clear_bit 622#define ocfs2_clear_bit ext2_clear_bit
616#define ocfs2_test_bit ext2_test_bit 623#define ocfs2_test_bit ext2_test_bit
617#define ocfs2_find_next_zero_bit ext2_find_next_zero_bit 624#define ocfs2_find_next_zero_bit ext2_find_next_zero_bit
625#define ocfs2_find_next_bit ext2_find_next_bit
618#endif /* OCFS2_H */ 626#endif /* OCFS2_H */
619 627