aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/xattr.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/xattr.h')
-rw-r--r--fs/ocfs2/xattr.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/ocfs2/xattr.h b/fs/ocfs2/xattr.h
index 02afa87d5e69..c25c7c62a059 100644
--- a/fs/ocfs2/xattr.h
+++ b/fs/ocfs2/xattr.h
@@ -57,4 +57,12 @@ static inline u16 ocfs2_blocks_per_xattr_bucket(struct super_block *sb)
57{ 57{
58 return OCFS2_XATTR_BUCKET_SIZE / (1 << sb->s_blocksize_bits); 58 return OCFS2_XATTR_BUCKET_SIZE / (1 << sb->s_blocksize_bits);
59} 59}
60
61static inline u16 ocfs2_xattr_max_xe_in_bucket(struct super_block *sb)
62{
63 u16 len = sb->s_blocksize -
64 offsetof(struct ocfs2_xattr_header, xh_entries);
65
66 return len / sizeof(struct ocfs2_xattr_entry);
67}
60#endif /* OCFS2_XATTR_H */ 68#endif /* OCFS2_XATTR_H */