Documentation/Configure.help | 66 ++ arch/alpha/defconfig | 7 arch/alpha/kernel/entry.S | 12 arch/arm/defconfig | 7 arch/arm/kernel/calls.S | 24 arch/i386/defconfig | 7 arch/ia64/defconfig | 7 arch/ia64/kernel/entry.S | 24 arch/m68k/defconfig | 7 arch/mips/defconfig | 7 arch/mips64/defconfig | 7 arch/ppc/defconfig | 14 arch/ppc64/kernel/misc.S | 2 arch/s390/defconfig | 7 arch/s390/kernel/entry.S | 24 arch/s390x/defconfig | 7 arch/s390x/kernel/entry.S | 24 arch/s390x/kernel/wrapper32.S | 92 +++ arch/sparc/defconfig | 7 arch/sparc/kernel/systbls.S | 10 arch/sparc64/defconfig | 7 arch/sparc64/kernel/systbls.S | 20 fs/Config.in | 14 fs/Makefile | 3 fs/ext2/Makefile | 4 fs/ext2/file.c | 5 fs/ext2/ialloc.c | 2 fs/ext2/inode.c | 34 - fs/ext2/namei.c | 14 fs/ext2/super.c | 29 fs/ext2/symlink.c | 14 fs/ext2/xattr.c | 1212 +++++++++++++++++++++++++++++++++++++++++ fs/ext2/xattr_user.c | 103 +++ fs/ext3/Makefile | 10 fs/ext3/file.c | 5 fs/ext3/ialloc.c | 2 fs/ext3/inode.c | 35 - fs/ext3/namei.c | 21 fs/ext3/super.c | 36 + fs/ext3/symlink.c | 14 fs/ext3/xattr.c | 1225 ++++++++++++++++++++++++++++++++++++++++++ fs/ext3/xattr_user.c | 111 +++ fs/jfs/jfs_xattr.h | 6 fs/jfs/xattr.c | 6 fs/mbcache.c | 648 ++++++++++++++++++++++ include/asm-arm/unistd.h | 2 include/asm-ia64/unistd.h | 13 include/asm-ppc64/unistd.h | 2 include/asm-s390/unistd.h | 15 include/asm-s390x/unistd.h | 15 include/asm-sparc/unistd.h | 24 include/asm-sparc64/unistd.h | 24 include/linux/cache_def.h | 15 include/linux/errno.h | 4 include/linux/ext2_fs.h | 31 - include/linux/ext2_xattr.h | 157 +++++ include/linux/ext3_fs.h | 31 - include/linux/ext3_jbd.h | 8 include/linux/ext3_xattr.h | 157 +++++ include/linux/fs.h | 2 include/linux/mbcache.h | 69 ++ kernel/ksyms.c | 4 mm/vmscan.c | 35 + fs/ext3/ext3-exports.c | 14 + 64 files changed, 4355 insertions(+), 195 deletions(-) Index: linux-2.4.21-chaos/Documentation/Configure.help =================================================================== --- linux-2.4.21-chaos.orig/Documentation/Configure.help 2003-10-04 01:18:57.000000000 +0400 +++ linux-2.4.21-chaos/Documentation/Configure.help 2003-12-14 15:11:46.000000000 +0300 @@ -16008,6 +16041,39 @@ If unsure, say N. +Ext3 extended attributes +CONFIG_EXT3_FS_XATTR + Extended attributes are name:value pairs associated with inodes by + the kernel or by users (see the attr(5) manual page, or visit + for details). + + If unsure, say N. + +Ext3 extended attribute block sharing +CONFIG_EXT3_FS_XATTR_SHARING + This options enables code for sharing identical extended attribute + blocks among multiple inodes. + + Usually, say Y. + +Ext3 extended user attributes +CONFIG_EXT3_FS_XATTR_USER + This option enables extended user attributes on ext3. Processes can + associate extended user attributes with inodes to store additional + information such as the character encoding of files, etc. (see the + attr(5) manual page, or visit for details). + + If unsure, say N. + +Ext3 trusted extended attributes +CONFIG_EXT3_FS_XATTR_TRUSTED + This option enables extended attributes on ext3 that are accessible + (and visible) only to users capable of CAP_SYS_ADMIN. Usually this + is only the super user. Trusted extended attributes are meant for + implementing system/security services. + + If unsure, say N. + Journal Block Device support (JBD for ext3) (EXPERIMENTAL) CONFIG_JBD This is a generic journalling layer for block devices. It is Index: linux-2.4.21-chaos/fs/ext3/Makefile =================================================================== --- linux-2.4.21-chaos.orig/fs/ext3/Makefile 2003-12-14 15:09:30.000000000 +0300 +++ linux-2.4.21-chaos/fs/ext3/Makefile 2003-12-14 15:11:46.000000000 +0300 @@ -9,10 +9,10 @@ O_TARGET := ext3.o -export-objs := super.o inode.o +export-objs := ext3-exports.o obj-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \ - ioctl.o namei.o super.o symlink.o hash.o + ioctl.o namei.o super.o symlink.o hash.o ext3-exports.o obj-m := $(O_TARGET) export-objs += xattr.o Index: linux-2.4.21-chaos/fs/ext3/super.c =================================================================== --- linux-2.4.21-chaos.orig/fs/ext3/super.c 2003-12-14 15:09:30.000000000 +0300 +++ linux-2.4.21-chaos/fs/ext3/super.c 2003-12-14 15:11:46.000000000 +0300 @@ -1944,9 +1944,6 @@ unregister_filesystem(&ext3_fs_type); } -EXPORT_SYMBOL(ext3_force_commit); -EXPORT_SYMBOL(ext3_bread); - MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others"); MODULE_DESCRIPTION("Second Extended Filesystem with journaling extensions"); MODULE_LICENSE("GPL"); Index: linux-2.4.21-chaos/fs/ext3/ext3-exports.c =================================================================== --- linux-2.4.21-chaos.orig/fs/ext3/ext3-exports.c 2003-01-30 13:24:37.000000000 +0300 +++ linux-2.4.21-chaos/fs/ext3/ext3-exports.c 2003-12-14 15:11:46.000000000 +0300 @@ -0,0 +1,14 @@ +#include +#include +#include +#include +#include + +EXPORT_SYMBOL(ext3_force_commit); +EXPORT_SYMBOL(ext3_bread); +EXPORT_SYMBOL(ext3_journal_abort_handle); +EXPORT_SYMBOL(ext3_xattr_register); +EXPORT_SYMBOL(ext3_xattr_unregister); +EXPORT_SYMBOL(ext3_xattr_get); +EXPORT_SYMBOL(ext3_xattr_list); +EXPORT_SYMBOL(ext3_xattr_set); Index: linux-2.4.21-chaos/fs/ext3/xattr_trusted.c =================================================================== --- linux-2.4.21-chaos.orig/fs/ext3/xattr_trusted.c 2003-07-15 04:41:01.000000000 +0400 +++ linux-2.4.21-chaos/fs/ext3/xattr_trusted.c 2003-12-14 15:11:46.000000000 +0300 @@ -50,7 +50,7 @@ return -EINVAL; if (!capable(CAP_SYS_ADMIN)) return -EPERM; - return ext3_xattr_set(inode, EXT3_XATTR_INDEX_TRUSTED, name, + return ext3_xattr_set_trans(inode, EXT3_XATTR_INDEX_TRUSTED, name, value, size, flags); } Index: linux-2.4.21-chaos/fs/ext3/xattr.c =================================================================== --- linux-2.4.21-chaos.orig/fs/ext3/xattr.c 2003-07-30 04:11:55.000000000 +0400 +++ linux-2.4.21-chaos/fs/ext3/xattr.c 2003-12-14 15:11:46.000000000 +0300 @@ -868,7 +868,7 @@ } /* - * ext3_xattr_set() + * ext3_xattr_set_trans() * * Like ext3_xattr_set_handle, but start from an inode. This extended * attribute modification is a filesystem transaction by itself. @@ -876,7 +876,7 @@ * Returns 0, or a negative error number on failure. */ int -ext3_xattr_set(struct inode *inode, int name_index, const char *name, +ext3_xattr_set_trans(struct inode *inode, int name_index, const char *name, const void *value, size_t value_len, int flags) { handle_t *handle; @@ -895,6 +895,20 @@ return error ? error : error2; } +int +ext3_xattr_set(handle_t *handle, struct inode *inode, int name_index, + const char *name, const void *value, size_t value_len, + int flags) +{ + int error; + + lock_kernel(); + error = ext3_xattr_set_handle(handle, inode, name_index, name, + value, value_len, flags); + unlock_kernel(); + return error; +} + /* * ext3_xattr_delete_inode() * Index: linux-2.4.21-chaos/fs/ext3/xattr_user.c =================================================================== --- linux-2.4.21-chaos.orig/fs/ext3/xattr_user.c 2003-07-30 04:11:55.000000000 +0400 +++ linux-2.4.21-chaos/fs/ext3/xattr_user.c 2003-12-14 15:26:58.000000000 +0300 @@ -70,7 +70,7 @@ if (error) return error; - return ext3_xattr_set(inode, EXT3_XATTR_INDEX_USER, name, + return ext3_xattr_set_trans(inode, EXT3_XATTR_INDEX_USER, name, value, size, flags); } Index: linux-2.4.21-chaos/include/linux/errno.h =================================================================== --- linux-2.4.21-chaos.orig/include/linux/errno.h 2003-07-15 04:41:12.000000000 +0400 +++ linux-2.4.21-chaos/include/linux/errno.h 2003-12-14 15:11:46.000000000 +0300 @@ -26,4 +26,8 @@ #endif +/* Defined for extended attributes */ +#define ENOATTR ENODATA /* No such attribute */ +#define ENOTSUP EOPNOTSUPP /* Operation not supported */ + #endif Index: linux-2.4.21-chaos/include/linux/ext3_xattr.h =================================================================== --- linux-2.4.21-chaos.orig/include/linux/ext3_xattr.h 2003-12-05 16:54:33.000000000 +0300 +++ linux-2.4.21-chaos/include/linux/ext3_xattr.h 2003-12-14 15:21:13.000000000 +0300 @@ -82,8 +82,10 @@ extern int ext3_xattr_list(struct inode *, char *, size_t); extern int ext3_xattr_set_handle(handle_t *handle, struct inode *, int, const char *, const void *, size_t, int); -extern int ext3_xattr_set(struct inode *, int, const char *, const void *, +extern int ext3_xattr_set_trans(struct inode *, int, const char *, const void *, size_t, int); +extern int ext3_xattr_set(handle_t *, struct inode *, int, const char *, + const void *, size_t, int); extern void ext3_xattr_delete_inode(handle_t *, struct inode *); extern void ext3_xattr_put_super(struct super_block *);