aboutsummaryrefslogtreecommitdiff
path: root/fs/ocfs2/ocfs2_fs.h
diff options
context:
space:
mode:
authorTiger Yang <tiger.yang@oracle.com>2008-08-18 17:11:00 +0800
committerMark Fasheh <mfasheh@suse.com>2008-10-13 16:57:02 -0700
commitcf1d6c763fbcb115263114302485ad17e7933d87 (patch)
tree85717dc9d20b7ac1e31b683653933f2d30099f44 /fs/ocfs2/ocfs2_fs.h
parentfdd77704a8b4666a32120fcd1e4a9fedaf3263d8 (diff)
ocfs2: Add extended attribute support
This patch implements storing extended attributes both in inode or a single external block. We only store EA's in-inode when blocksize > 512 or that inode block has free space for it. When an EA's value is larger than 80 bytes, we will store the value via b-tree outside inode or block. Signed-off-by: Tiger Yang <tiger.yang@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/ocfs2_fs.h')
-rw-r--r--fs/ocfs2/ocfs2_fs.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/ocfs2/ocfs2_fs.h b/fs/ocfs2/ocfs2_fs.h
index 1055ba0af9b..98e1f8bba0e 100644
--- a/fs/ocfs2/ocfs2_fs.h
+++ b/fs/ocfs2/ocfs2_fs.h
@@ -570,7 +570,7 @@ struct ocfs2_super_block {
/*40*/ __le16 s_max_slots; /* Max number of simultaneous mounts
before tunefs required */
__le16 s_tunefs_flag;
- __le32 s_reserved1;
+ __le32 s_uuid_hash; /* hash value of uuid */
__le64 s_first_cluster_group; /* Block offset of 1st cluster
* group header */
/*50*/ __u8 s_label[OCFS2_MAX_VOL_LABEL_LEN]; /* Label for mounting, etc. */
@@ -787,7 +787,11 @@ struct ocfs2_xattr_tree_root {
/*10*/ struct ocfs2_extent_list xt_list; /* Extent record list */
};
-#define OCFS2_XATTR_INDEXED 0x1
+#define OCFS2_XATTR_INDEXED 0x1
+#define OCFS2_HASH_SHIFT 5
+#define OCFS2_XATTR_ROUND 3
+#define OCFS2_XATTR_SIZE(size) (((size) + OCFS2_XATTR_ROUND) & \
+ ~(OCFS2_XATTR_ROUND))
/*
* On disk structure for xattr block.