aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/xattr.h
diff options
context:
space:
mode:
authorMingming Cao <cmm@us.ibm.com>2006-10-11 04:20:53 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-11 14:14:15 -0400
commit617ba13b31fbf505cc21799826639ef24ed94af0 (patch)
tree2a41e8c993f7c1eed115ad24047d546ba56cbdf5 /fs/ext4/xattr.h
parentac27a0ec112a089f1a5102bc8dffc79c8c815571 (diff)
[PATCH] ext4: rename ext4 symbols to avoid duplication of ext3 symbols
Mingming Cao originally did this work, and Shaggy reproduced it using some scripts from her. Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ext4/xattr.h')
-rw-r--r--fs/ext4/xattr.h110
1 files changed, 55 insertions, 55 deletions
diff --git a/fs/ext4/xattr.h b/fs/ext4/xattr.h
index 6b1ae1c6182c..79432b35398f 100644
--- a/fs/ext4/xattr.h
+++ b/fs/ext4/xattr.h
@@ -1,7 +1,7 @@
1/* 1/*
2 File: fs/ext3/xattr.h 2 File: fs/ext4/xattr.h
3 3
4 On-disk format of extended attributes for the ext3 filesystem. 4 On-disk format of extended attributes for the ext4 filesystem.
5 5
6 (C) 2001 Andreas Gruenbacher, <a.gruenbacher@computer.org> 6 (C) 2001 Andreas Gruenbacher, <a.gruenbacher@computer.org>
7*/ 7*/
@@ -9,20 +9,20 @@
9#include <linux/xattr.h> 9#include <linux/xattr.h>
10 10
11/* Magic value in attribute blocks */ 11/* Magic value in attribute blocks */
12#define EXT3_XATTR_MAGIC 0xEA020000 12#define EXT4_XATTR_MAGIC 0xEA020000
13 13
14/* Maximum number of references to one attribute block */ 14/* Maximum number of references to one attribute block */
15#define EXT3_XATTR_REFCOUNT_MAX 1024 15#define EXT4_XATTR_REFCOUNT_MAX 1024
16 16
17/* Name indexes */ 17/* Name indexes */
18#define EXT3_XATTR_INDEX_USER 1 18#define EXT4_XATTR_INDEX_USER 1
19#define EXT3_XATTR_INDEX_POSIX_ACL_ACCESS 2 19#define EXT4_XATTR_INDEX_POSIX_ACL_ACCESS 2
20#define EXT3_XATTR_INDEX_POSIX_ACL_DEFAULT 3 20#define EXT4_XATTR_INDEX_POSIX_ACL_DEFAULT 3
21#define EXT3_XATTR_INDEX_TRUSTED 4 21#define EXT4_XATTR_INDEX_TRUSTED 4
22#define EXT3_XATTR_INDEX_LUSTRE 5 22#define EXT4_XATTR_INDEX_LUSTRE 5
23#define EXT3_XATTR_INDEX_SECURITY 6 23#define EXT4_XATTR_INDEX_SECURITY 6
24 24
25struct ext3_xattr_header { 25struct ext4_xattr_header {
26 __le32 h_magic; /* magic number for identification */ 26 __le32 h_magic; /* magic number for identification */
27 __le32 h_refcount; /* reference count */ 27 __le32 h_refcount; /* reference count */
28 __le32 h_blocks; /* number of disk blocks used */ 28 __le32 h_blocks; /* number of disk blocks used */
@@ -30,11 +30,11 @@ struct ext3_xattr_header {
30 __u32 h_reserved[4]; /* zero right now */ 30 __u32 h_reserved[4]; /* zero right now */
31}; 31};
32 32
33struct ext3_xattr_ibody_header { 33struct ext4_xattr_ibody_header {
34 __le32 h_magic; /* magic number for identification */ 34 __le32 h_magic; /* magic number for identification */
35}; 35};
36 36
37struct ext3_xattr_entry { 37struct ext4_xattr_entry {
38 __u8 e_name_len; /* length of name */ 38 __u8 e_name_len; /* length of name */
39 __u8 e_name_index; /* attribute name index */ 39 __u8 e_name_index; /* attribute name index */
40 __le16 e_value_offs; /* offset in disk block of value */ 40 __le16 e_value_offs; /* offset in disk block of value */
@@ -44,100 +44,100 @@ struct ext3_xattr_entry {
44 char e_name[0]; /* attribute name */ 44 char e_name[0]; /* attribute name */
45}; 45};
46 46
47#define EXT3_XATTR_PAD_BITS 2 47#define EXT4_XATTR_PAD_BITS 2
48#define EXT3_XATTR_PAD (1<<EXT3_XATTR_PAD_BITS) 48#define EXT4_XATTR_PAD (1<<EXT4_XATTR_PAD_BITS)
49#define EXT3_XATTR_ROUND (EXT3_XATTR_PAD-1) 49#define EXT4_XATTR_ROUND (EXT4_XATTR_PAD-1)
50#define EXT3_XATTR_LEN(name_len) \ 50#define EXT4_XATTR_LEN(name_len) \
51 (((name_len) + EXT3_XATTR_ROUND + \ 51 (((name_len) + EXT4_XATTR_ROUND + \
52 sizeof(struct ext3_xattr_entry)) & ~EXT3_XATTR_ROUND) 52 sizeof(struct ext4_xattr_entry)) & ~EXT4_XATTR_ROUND)
53#define EXT3_XATTR_NEXT(entry) \ 53#define EXT4_XATTR_NEXT(entry) \
54 ( (struct ext3_xattr_entry *)( \ 54 ( (struct ext4_xattr_entry *)( \
55 (char *)(entry) + EXT3_XATTR_LEN((entry)->e_name_len)) ) 55 (char *)(entry) + EXT4_XATTR_LEN((entry)->e_name_len)) )
56#define EXT3_XATTR_SIZE(size) \ 56#define EXT4_XATTR_SIZE(size) \
57 (((size) + EXT3_XATTR_ROUND) & ~EXT3_XATTR_ROUND) 57 (((size) + EXT4_XATTR_ROUND) & ~EXT4_XATTR_ROUND)
58 58
59# ifdef CONFIG_EXT3_FS_XATTR 59# ifdef CONFIG_EXT4DEV_FS_XATTR
60 60
61extern struct xattr_handler ext3_xattr_user_handler; 61extern struct xattr_handler ext4_xattr_user_handler;
62extern struct xattr_handler ext3_xattr_trusted_handler; 62extern struct xattr_handler ext4_xattr_trusted_handler;
63extern struct xattr_handler ext3_xattr_acl_access_handler; 63extern struct xattr_handler ext4_xattr_acl_access_handler;
64extern struct xattr_handler ext3_xattr_acl_default_handler; 64extern struct xattr_handler ext4_xattr_acl_default_handler;
65extern struct xattr_handler ext3_xattr_security_handler; 65extern struct xattr_handler ext4_xattr_security_handler;
66 66
67extern ssize_t ext3_listxattr(struct dentry *, char *, size_t); 67extern ssize_t ext4_listxattr(struct dentry *, char *, size_t);
68 68
69extern int ext3_xattr_get(struct inode *, int, const char *, void *, size_t); 69extern int ext4_xattr_get(struct inode *, int, const char *, void *, size_t);
70extern int ext3_xattr_list(struct inode *, char *, size_t); 70extern int ext4_xattr_list(struct inode *, char *, size_t);
71extern int ext3_xattr_set(struct inode *, int, const char *, const void *, size_t, int); 71extern int ext4_xattr_set(struct inode *, int, const char *, const void *, size_t, int);
72extern int ext3_xattr_set_handle(handle_t *, struct inode *, int, const char *, const void *, size_t, int); 72extern int ext4_xattr_set_handle(handle_t *, struct inode *, int, const char *, const void *, size_t, int);
73 73
74extern void ext3_xattr_delete_inode(handle_t *, struct inode *); 74extern void ext4_xattr_delete_inode(handle_t *, struct inode *);
75extern void ext3_xattr_put_super(struct super_block *); 75extern void ext4_xattr_put_super(struct super_block *);
76 76
77extern int init_ext3_xattr(void); 77extern int init_ext4_xattr(void);
78extern void exit_ext3_xattr(void); 78extern void exit_ext4_xattr(void);
79 79
80extern struct xattr_handler *ext3_xattr_handlers[]; 80extern struct xattr_handler *ext4_xattr_handlers[];
81 81
82# else /* CONFIG_EXT3_FS_XATTR */ 82# else /* CONFIG_EXT4DEV_FS_XATTR */
83 83
84static inline int 84static inline int
85ext3_xattr_get(struct inode *inode, int name_index, const char *name, 85ext4_xattr_get(struct inode *inode, int name_index, const char *name,
86 void *buffer, size_t size, int flags) 86 void *buffer, size_t size, int flags)
87{ 87{
88 return -EOPNOTSUPP; 88 return -EOPNOTSUPP;
89} 89}
90 90
91static inline int 91static inline int
92ext3_xattr_list(struct inode *inode, void *buffer, size_t size) 92ext4_xattr_list(struct inode *inode, void *buffer, size_t size)
93{ 93{
94 return -EOPNOTSUPP; 94 return -EOPNOTSUPP;
95} 95}
96 96
97static inline int 97static inline int
98ext3_xattr_set(struct inode *inode, int name_index, const char *name, 98ext4_xattr_set(struct inode *inode, int name_index, const char *name,
99 const void *value, size_t size, int flags) 99 const void *value, size_t size, int flags)
100{ 100{
101 return -EOPNOTSUPP; 101 return -EOPNOTSUPP;
102} 102}
103 103
104static inline int 104static inline int
105ext3_xattr_set_handle(handle_t *handle, struct inode *inode, int name_index, 105ext4_xattr_set_handle(handle_t *handle, struct inode *inode, int name_index,
106 const char *name, const void *value, size_t size, int flags) 106 const char *name, const void *value, size_t size, int flags)
107{ 107{
108 return -EOPNOTSUPP; 108 return -EOPNOTSUPP;
109} 109}
110 110
111static inline void 111static inline void
112ext3_xattr_delete_inode(handle_t *handle, struct inode *inode) 112ext4_xattr_delete_inode(handle_t *handle, struct inode *inode)
113{ 113{
114} 114}
115 115
116static inline void 116static inline void
117ext3_xattr_put_super(struct super_block *sb) 117ext4_xattr_put_super(struct super_block *sb)
118{ 118{
119} 119}
120 120
121static inline int 121static inline int
122init_ext3_xattr(void) 122init_ext4_xattr(void)
123{ 123{
124 return 0; 124 return 0;
125} 125}
126 126
127static inline void 127static inline void
128exit_ext3_xattr(void) 128exit_ext4_xattr(void)
129{ 129{
130} 130}
131 131
132#define ext3_xattr_handlers NULL 132#define ext4_xattr_handlers NULL
133 133
134# endif /* CONFIG_EXT3_FS_XATTR */ 134# endif /* CONFIG_EXT4DEV_FS_XATTR */
135 135
136#ifdef CONFIG_EXT3_FS_SECURITY 136#ifdef CONFIG_EXT4DEV_FS_SECURITY
137extern int ext3_init_security(handle_t *handle, struct inode *inode, 137extern int ext4_init_security(handle_t *handle, struct inode *inode,
138 struct inode *dir); 138 struct inode *dir);
139#else 139#else
140static inline int ext3_init_security(handle_t *handle, struct inode *inode, 140static inline int ext4_init_security(handle_t *handle, struct inode *inode,
141 struct inode *dir) 141 struct inode *dir)
142{ 142{
143 return 0; 143 return 0;