diff options
| author | Theodore Y. Ts'o <tytso@snap.thunk.org> | 2002-10-30 16:24:39 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@penguin.transmeta.com> | 2002-10-30 16:24:39 -0500 |
| commit | f7cfad917acd4f7deaf48ae42c7b110e3e3fe999 (patch) | |
| tree | 6506577e61d459d260a2cfc001290da4c98383ad /include/linux | |
| parent | 7cbc2addb39a8f7b0c4a0b607b2275e5225afc38 (diff) | |
Port of (bugfixed) 0.8.50 xattr-ext3 to 2.5 (w/ hch cleanups. mbcache API)
This patch adds extended attribute support to the ext3 filesystem. This
uses the generic extended attribute patch which was developed by Andreas
Gruenbacher and the XFS team. As a result, the user space utilities
which work for XFS will also work with these patches.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/ext3_fs.h | 31 | ||||
| -rw-r--r-- | include/linux/ext3_jbd.h | 8 |
2 files changed, 12 insertions, 27 deletions
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index a7fb7495ad48..f23c5a1a8a2e 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h @@ -64,8 +64,6 @@ */ #define EXT3_BAD_INO 1 /* Bad blocks inode */ #define EXT3_ROOT_INO 2 /* Root inode */ -#define EXT3_ACL_IDX_INO 3 /* ACL inode */ -#define EXT3_ACL_DATA_INO 4 /* ACL inode */ #define EXT3_BOOT_LOADER_INO 5 /* Boot loader inode */ #define EXT3_UNDEL_DIR_INO 6 /* Undelete directory inode */ #define EXT3_RESIZE_INO 7 /* Reserved group descriptors inode */ @@ -95,7 +93,6 @@ #else # define EXT3_BLOCK_SIZE(s) (EXT3_MIN_BLOCK_SIZE << (s)->s_log_block_size) #endif -#define EXT3_ACLE_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / sizeof (struct ext3_acl_entry)) #define EXT3_ADDR_PER_BLOCK(s) (EXT3_BLOCK_SIZE(s) / sizeof (__u32)) #ifdef __KERNEL__ # define EXT3_BLOCK_SIZE_BITS(s) ((s)->s_blocksize_bits) @@ -130,28 +127,6 @@ #endif /* - * ACL structures - */ -struct ext3_acl_header /* Header of Access Control Lists */ -{ - __u32 aclh_size; - __u32 aclh_file_count; - __u32 aclh_acle_count; - __u32 aclh_first_acle; -}; - -struct ext3_acl_entry /* Access Control List Entry */ -{ - __u32 acle_size; - __u16 acle_perms; /* Access permissions */ - __u16 acle_type; /* Type of entry */ - __u16 acle_tag; /* User or group identity */ - __u16 acle_pad1; - __u32 acle_next; /* Pointer on next entry for the */ - /* same inode or on next free entry */ -}; - -/* * Structure of a blocks group descriptor */ struct ext3_group_desc @@ -347,6 +322,7 @@ struct ext3_inode { #define EXT3_MOUNT_WRITEBACK_DATA 0x0C00 /* No data ordering */ #define EXT3_MOUNT_UPDATE_JOURNAL 0x1000 /* Update the journal format */ #define EXT3_MOUNT_NO_UID32 0x2000 /* Disable 32-bit UIDs */ +#define EXT3_MOUNT_XATTR_USER 0x4000 /* Extended user attributes */ /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */ #ifndef _LINUX_EXT2_FS_H @@ -532,7 +508,7 @@ static inline struct ext3_inode_info *EXT3_I(struct inode *inode) #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV 0x0008 /* Journal device */ #define EXT3_FEATURE_INCOMPAT_META_BG 0x0010 -#define EXT3_FEATURE_COMPAT_SUPP 0 +#define EXT3_FEATURE_COMPAT_SUPP EXT2_FEATURE_COMPAT_EXT_ATTR #define EXT2_FEATURE_INCOMPAT_SUPP (EXT2_FEATURE_INCOMPAT_FILETYPE| \ EXT2_FEATURE_INCOMPAT_META_BG) #define EXT3_FEATURE_INCOMPAT_SUPP (EXT3_FEATURE_INCOMPAT_FILETYPE| \ @@ -731,6 +707,7 @@ extern unsigned long ext3_count_free (struct buffer_head *, unsigned); /* inode.c */ +extern int ext3_forget(handle_t *, int, struct inode *, struct buffer_head *, int); extern struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *); extern struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *); @@ -799,8 +776,10 @@ extern struct address_space_operations ext3_writeback_aops; /* namei.c */ extern struct inode_operations ext3_dir_inode_operations; +extern struct inode_operations ext3_special_inode_operations; /* symlink.c */ +extern struct inode_operations ext3_symlink_inode_operations; extern struct inode_operations ext3_fast_symlink_inode_operations; diff --git a/include/linux/ext3_jbd.h b/include/linux/ext3_jbd.h index fa99a7ffdf79..1985ecee6a3f 100644 --- a/include/linux/ext3_jbd.h +++ b/include/linux/ext3_jbd.h @@ -30,13 +30,19 @@ #define EXT3_SINGLEDATA_TRANS_BLOCKS 8 +/* Extended attributes may touch two data buffers, two bitmap buffers, + * and two group and summaries. */ + +#define EXT3_XATTR_TRANS_BLOCKS 8 + /* Define the minimum size for a transaction which modifies data. This * needs to take into account the fact that we may end up modifying two * quota files too (one for the group, one for the user quota). The * superblock only gets updated once, of course, so don't bother * counting that again for the quota updates. */ -#define EXT3_DATA_TRANS_BLOCKS (3 * EXT3_SINGLEDATA_TRANS_BLOCKS - 2) +#define EXT3_DATA_TRANS_BLOCKS (3 * EXT3_SINGLEDATA_TRANS_BLOCKS + \ + EXT3_XATTR_TRANS_BLOCKS - 2) extern int ext3_writepage_trans_blocks(struct inode *inode); |
