diff options
| author | Alex Tomas <alex@clusterfs.com> | 2005-01-04 05:29:07 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-04 05:29:07 -0800 |
| commit | 78085a465d71ca7b1bb20941326b2abe995f1f8c (patch) | |
| tree | 89fa5adbefed2e81424a6d29e86cf6e9fc65716f /include/linux | |
| parent | fbdce7d717510ff32a0714481c5b38a258f87e51 (diff) | |
[PATCH] ext3: support for EA in inode
1) intent of the patch is to get possibility to store EAs in the body of large
inode. it saves space and improves performance in some cases
2) the patch is quite simple: it works the same way original xattr does, but
using other storage (inode body). body has priority over separate block.
original routines (ext3_xattr_get, ext3_xattr_list, ext3_xattr_set) are
renamed to ext3_xattr_block_*. new routines that handle inode storate are
added (ext3_xattr_ibody_get, ext3_xattr_ibody_list, ext3_xattr_ibody_set).
routines ext3_xattr_get, ext3_xattr_list and ext3_xattr_set allow user to
accesss both the storages transparently
3) the change makes sense on filesystem with inode size >= 256 bytes only.
2.4 kernels don't support such a filesystems, AFAIK. 2.6 kernels do support
and ignore EAs stored in a body w/o the patch
4) debugfs and e2fsck need to be patched to deal with EAs in inode
the patch will be sent later
5) testing results:
a) Andrew Samba Master (tridge) has done successful tests
b) we've been using ea-in-inode feature in Lustre for many months
Signed-off-by: Andreas Dilger <adilger@clusterfs.com>
Signed-off-by: Alex Tomas <alex@clusterfs.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/ext3_fs.h | 3 | ||||
| -rw-r--r-- | include/linux/ext3_fs_i.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 5e0e52b0fc7e..f3af9537c79c 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h @@ -293,6 +293,8 @@ struct ext3_inode { __u32 m_i_reserved2[2]; } masix2; } osd2; /* OS dependent 2 */ + __u16 i_extra_isize; + __u16 i_pad1; }; #define i_size_high i_dir_acl @@ -755,6 +757,7 @@ extern int ext3_forget(handle_t *, int, struct inode *, struct buffer_head *, in 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 *); +extern int ext3_get_inode_loc(struct inode *, struct ext3_iloc *, int); extern void ext3_read_inode (struct inode *); extern int ext3_write_inode (struct inode *, int); extern int ext3_setattr (struct dentry *, struct iattr *); diff --git a/include/linux/ext3_fs_i.h b/include/linux/ext3_fs_i.h index 328cd40c5ea4..5e781aaff404 100644 --- a/include/linux/ext3_fs_i.h +++ b/include/linux/ext3_fs_i.h @@ -113,6 +113,9 @@ struct ext3_inode_info { */ loff_t i_disksize; + /* on-disk additional length */ + __u16 i_extra_isize; + /* * truncate_sem is for serialising ext3_truncate() against * ext3_getblock(). In the 2.4 ext2 design, great chunks of inode's |
