0001
0002
0003
0004
0005
0006 #ifndef H_JFS_XATTR
0007 #define H_JFS_XATTR
0008
0009 #include <linux/xattr.h>
0010
0011
0012
0013
0014
0015
0016 struct jfs_ea {
0017 u8 flag;
0018 u8 namelen;
0019 __le16 valuelen;
0020 char name[];
0021 };
0022
0023 struct jfs_ea_list {
0024 __le32 size;
0025 struct jfs_ea ea[];
0026 };
0027
0028
0029 #define MAXEASIZE 65535
0030 #define MAXEALISTSIZE MAXEASIZE
0031
0032
0033
0034
0035 #define EA_SIZE(ea) \
0036 (sizeof (struct jfs_ea) + (ea)->namelen + 1 + \
0037 le16_to_cpu((ea)->valuelen))
0038 #define NEXT_EA(ea) ((struct jfs_ea *) (((char *) (ea)) + (EA_SIZE (ea))))
0039 #define FIRST_EA(ealist) ((ealist)->ea)
0040 #define EALIST_SIZE(ealist) le32_to_cpu((ealist)->size)
0041 #define END_EALIST(ealist) \
0042 ((struct jfs_ea *) (((char *) (ealist)) + EALIST_SIZE(ealist)))
0043
0044 extern int __jfs_setxattr(tid_t, struct inode *, const char *, const void *,
0045 size_t, int);
0046 extern ssize_t __jfs_getxattr(struct inode *, const char *, void *, size_t);
0047 extern ssize_t jfs_listxattr(struct dentry *, char *, size_t);
0048
0049 extern const struct xattr_handler *jfs_xattr_handlers[];
0050
0051 #ifdef CONFIG_JFS_SECURITY
0052 extern int jfs_init_security(tid_t, struct inode *, struct inode *,
0053 const struct qstr *);
0054 #else
0055 static inline int jfs_init_security(tid_t tid, struct inode *inode,
0056 struct inode *dir, const struct qstr *qstr)
0057 {
0058 return 0;
0059 }
0060 #endif
0061
0062 #endif