4/11 Ext2/3 Updates: Extended attributes, ACL, etc.
PATCH 1/1 4/11 Ext2/3 Updates: Extended attributes, ACL, etc.
Port of the 0.8.50 xattr-mbcache patch to 2.5. (Shrinker API, hch cleanups) (now uses struct block_device * to index devices, and uses hash.h for hash function)
This patch creates a meta block cache which is utilized by the ext3 and ext2 extended attribute patch (patches 2 and 3, respectively). This cache allows directory blocks to be indexed by multiple keys. In the case of the extended attribute patches, it is used to look up blocks by both the block number and by the hash of the extended attributes. This is extremely important to allow the sharing of acl's when stored as extended attributes. Otherwise every single file would require its own, separate, one block overhead to store then ACL, even though there might be a large number of files that have the same ACL.
fs/Config.in | 11 fs/Makefile | 4 fs/mbcache.c | 702 ++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/mbcache.h | 72 ++++ 4 files changed, 788 insertions(+), 1 deletion(-)
fs/Config.in +11 -0
@@ -185,6 +185,17 @@ define_tristate CONFIG_ZISOFS_FS n fi +# Meta block cache for Extended Attributes (ext2/ext3) +if [ "$CONFIG_EXT2_FS_XATTR" = "y" -o "$CONFIG_EXT3_FS_XATTR" = "y" ]; then + if [ "$CONFIG_EXT2_FS" = "y" -o "$CONFIG_EXT3_FS" = "y" ]; then + define_tristate CONFIG_FS_MBCACHE y + else + if [ "$CONFIG_EXT2_FS" = "m" -o "$CONFIG_EXT3_FS" = "m" ]; then + define_tristate CONFIG_FS_MBCACHE m + fi + fi +fi + mainmenu_option next_comment comment 'Partition Types' source fs/partitions/Config.in
fs/Makefile +3 -1
@@ -6,7 +6,7 @@ # export-objs := open.o dcache.o buffer.o bio.o inode.o dquot.o mpage.o aio.o \ - fcntl.o read_write.o dcookies.o + fcntl.o read_write.o dcookies.o mbcache.o obj-y := open.o read_write.o devices.o file_table.o buffer.o \ bio.o super.o block_dev.o char_dev.o stat.o exec.o pipe.o \
@@ -29,6 +29,8 @@ obj-y += binfmt_script.o obj-$(CONFIG_BINFMT_ELF) += binfmt_elf.o + +obj-$(CONFIG_FS_MBCACHE) += mbcache.o obj-$(CONFIG_QUOTA) += dquot.o obj-$(CONFIG_QFMT_V1) += quota_v1.o
fs/mbcache.c new file +702 -0
702 lines not on this page · raw message
include/linux/mbcache.h new file +72 -0
72 lines not on this page · raw message