Add extended attributes to ext2/3
PATCH 2/4 Add extended attributes to ext2/3
This patch creates a meta block cache which is utilized by the ext3 and ext2 extended attribute patch (patches 3 and 4, 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.
- Ted
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
#
# fs/Config.in | 9 # fs/Makefile | 4 # fs/mbcache.c | 716 +++++++++++++++++++++++++++++++++++++++++++ # include/linux/mbcache.h | 69 ++++
# 4 files changed, 797 insertions(+), 1 deletion(-) #
# The following is the BitKeeper ChangeSet Log # --------------------------------------------
# 02/10/14 [email protected] 1.784
# Port of the 0.8.50 xattr-mbcache patch to 2.5. #
# -------------------------------------------- #
fs/Config.in +9 -0
@@ -171,6 +171,15 @@ 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 + elif [ "$CONFIG_EXT2_FS" = "m" -o "$CONFIG_EXT3_FS" = "m" ]; then + define_tristate CONFIG_FS_MBCACHE m + 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 + fcntl.o read_write.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 +716 -0
716 lines not on this page · raw message
include/linux/mbcache.h new file +69 -0
69 lines not on this page · raw message