aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/ocfs2_fs.h
diff options
context:
space:
mode:
authorTiger Yang <tiger.yang@oracle.com>2008-08-18 05:11:00 -0400
committerMark Fasheh <mfasheh@suse.com>2008-10-13 19:57:02 -0400
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 1055ba0af9bb..98e1f8bba0e1 100644
--- a/fs/ocfs2/ocfs2_fs.h
+++ b/fs/ocfs2/ocfs2_fs.h
@@ -570,7 +570,7 @@ struct ocfs2_super_block {
570/*40*/ __le16 s_max_slots; /* Max number of simultaneous mounts 570/*40*/ __le16 s_max_slots; /* Max number of simultaneous mounts
571 before tunefs required */ 571 before tunefs required */
572 __le16 s_tunefs_flag; 572 __le16 s_tunefs_flag;
573 __le32 s_reserved1; 573 __le32 s_uuid_hash; /* hash value of uuid */
574 __le64 s_first_cluster_group; /* Block offset of 1st cluster 574 __le64 s_first_cluster_group; /* Block offset of 1st cluster
575 * group header */ 575 * group header */
576/*50*/ __u8 s_label[OCFS2_MAX_VOL_LABEL_LEN]; /* Label for mounting, etc. */ 576/*50*/ __u8 s_label[OCFS2_MAX_VOL_LABEL_LEN]; /* Label for mounting, etc. */
@@ -787,7 +787,11 @@ struct ocfs2_xattr_tree_root {
787/*10*/ struct ocfs2_extent_list xt_list; /* Extent record list */ 787/*10*/ struct ocfs2_extent_list xt_list; /* Extent record list */
788}; 788};
789 789
790#define OCFS2_XATTR_INDEXED 0x1 790#define OCFS2_XATTR_INDEXED 0x1
791#define OCFS2_HASH_SHIFT 5
792#define OCFS2_XATTR_ROUND 3
793#define OCFS2_XATTR_SIZE(size) (((size) + OCFS2_XATTR_ROUND) & \
794 ~(OCFS2_XATTR_ROUND))
791 795
792/* 796/*
793 * On disk structure for xattr block. 797 * On disk structure for xattr block.