]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ocfs2/xattr.h
Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm
[linux-2.6-omap-h63xx.git] / fs / ocfs2 / xattr.h
index 02afa87d5e695acb86fe55342a399773e8170083..c25c7c62a0598303335f5ddd7ec497371cf3ec01 100644 (file)
@@ -57,4 +57,12 @@ static inline u16 ocfs2_blocks_per_xattr_bucket(struct super_block *sb)
 {
        return OCFS2_XATTR_BUCKET_SIZE / (1 << sb->s_blocksize_bits);
 }
+
+static inline u16 ocfs2_xattr_max_xe_in_bucket(struct super_block *sb)
+{
+       u16 len = sb->s_blocksize -
+                offsetof(struct ocfs2_xattr_header, xh_entries);
+
+       return len / sizeof(struct ocfs2_xattr_entry);
+}
 #endif /* OCFS2_XATTR_H */