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/Kconfig | 6 fs/Makefile | 4 fs/mbcache.c | 702 ++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/mbcache.h | 72 ++++ 4 files changed, 783 insertions(+), 1 deletion(-)
fs/Kconfig +6 -0
@@ -1406,6 +1406,12 @@ depends on ZISOFS default ISO9660_FS +# Meta block cache for Extended Attributes (ext2/ext3) +config FS_MBCACHE + tristate + depends on EXT2_FS_XATTR || EXT3_FS_XATTR + default m if EXT2_FS=m || EXT3_FS=m + default y if EXT2_FS=y || EXT3_FS=y menu "Partition Types"
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 fcblist.o + fcntl.o read_write.o dcookies.o fcblist.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