2007-05-22 12:08:14

by Kalpak Shah

[permalink] [raw]
Subject: [RFC][PATCH] Large EAs in ext4

Hi,

There was discussion at the LFS07 workshop regarding the need of large
extended attributes in ext4. Samba, some security mechanisms would
benefit from larger EAs. We have implemented this large EA support for
in ext4. Note that this also helps to have a larger number of EAs since
large EAs get written out to a new inode instead of the EA block.

If value of an attribute is greater than 2048 bytes the value is not
saved in the external EA block, instead it is saved in an inode. The EA
entry saves the inode number in e_value_inum field (earlier this was
e_value_block that was unused). The maximum size of the EA is limited to
64K due to VFS limitations as can be seen in linux/limits.h. A new
EXT4_FEATURE_INCOMPAT_EA_INODE feature has been added for this.

These inodes are not linked into any directory since a single directory
per filesystem will cause a bottleneck. But e2fsck can be easily
modified to understand that these EA-inodes do not have dirents. Instead
a "goal" argument has been added to the ext4_new_inode() function to
help a localized selection of the EA inode. Since ext4_new_inode() only
used the dir argument to choose the group, we use goal to do the same.

Your feedback/review/comments are appreciated.

Thanks,
Kalpak.


Attachments:
large_ea.patch (20.67 kB)