Extended Attributes for ext 2/3 filesystems
PATCH 1/3 Extended Attributes for ext 2/3 filesystems
This is an updated submission of the extended attribute patches for ext2/3 (versus bk-current). Many thanks to Cristoph, Andrea, and Andrew for their suggestions and cleanups. I believe this version should be ready for Linux 2.5. Linus, please apply.
This patch creates a meta block cache which is utilized by the ext3 and ext2 extended attribute patches (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.
- Ted
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas:
# ChangeSet 1.794 -> 1.795 # fs/Makefile 1.41 -> 1.42 # fs/Config.in 1.39 -> 1.40 # (new) -> 1.1 fs/mbcache.c # (new) -> 1.1 include/linux/mbcache.h
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/10/16 [email protected] 1.795
# 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.
# --------------------------------------------
#
diff -Nru a/fs/Config.in b/fs/Config.in
--- a/fs/Config.in Wed Oct 16 22:51:17 2002
+++ b/fs/Config.in Wed Oct 16 22:51:17 2002
@@ -182,6 +182,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 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