Whamcloud - gitweb
- 2.4.19-pre1 misses some xattr definitions in include/linux/limits.h and
authoralex <alex>
Tue, 13 Jan 2004 23:01:24 +0000 (23:01 +0000)
committeralex <alex>
Tue, 13 Jan 2004 23:01:24 +0000 (23:01 +0000)
  vmalloc_to_page() routine
- zc patch to match 2.4.19-pre1 context

lustre/kernel_patches/patches/linux-2.4.19-pre1-xattr-0.8.54.patch
lustre/kernel_patches/patches/tcp-zero-copy-2.4.19-pre1.patch [new file with mode: 0644]
lustre/kernel_patches/patches/vmalloc_to_page-2.4.19-pre1.patch [new file with mode: 0644]
lustre/kernel_patches/series/vanilla-2.4.19-pre1

index d5d0030..4107e70 100644 (file)
@@ -66,8 +66,8 @@
 
 Index: linux-2.4.19-pre1/Documentation/Configure.help
 ===================================================================
---- linux-2.4.19-pre1.orig/Documentation/Configure.help        2003-11-20 19:01:44.000000000 +0300
-+++ linux-2.4.19-pre1/Documentation/Configure.help     2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/Documentation/Configure.help        2004-01-14 01:11:29.000000000 +0300
++++ linux-2.4.19-pre1/Documentation/Configure.help     2004-01-14 01:11:49.000000000 +0300
 @@ -14035,6 +14035,39 @@
    be compiled as a module, and so this could be dangerous.  Most
    everyone wants to say Y here.
@@ -151,7 +151,7 @@ Index: linux-2.4.19-pre1/Documentation/Configure.help
 Index: linux-2.4.19-pre1/arch/alpha/defconfig
 ===================================================================
 --- linux-2.4.19-pre1.orig/arch/alpha/defconfig        2001-11-20 02:19:42.000000000 +0300
-+++ linux-2.4.19-pre1/arch/alpha/defconfig     2003-11-21 03:51:05.000000000 +0300
++++ linux-2.4.19-pre1/arch/alpha/defconfig     2004-01-14 01:11:49.000000000 +0300
 @@ -1,6 +1,13 @@
  #
  # Automatically generated make config: don't edit
@@ -169,7 +169,7 @@ Index: linux-2.4.19-pre1/arch/alpha/defconfig
 Index: linux-2.4.19-pre1/arch/alpha/kernel/entry.S
 ===================================================================
 --- linux-2.4.19-pre1.orig/arch/alpha/kernel/entry.S   2001-11-10 00:45:35.000000000 +0300
-+++ linux-2.4.19-pre1/arch/alpha/kernel/entry.S        2003-11-21 03:51:05.000000000 +0300
++++ linux-2.4.19-pre1/arch/alpha/kernel/entry.S        2004-01-14 01:11:49.000000000 +0300
 @@ -1148,3 +1148,16 @@
        .quad sys_gettid
        .quad sys_readahead
@@ -190,7 +190,7 @@ Index: linux-2.4.19-pre1/arch/alpha/kernel/entry.S
 Index: linux-2.4.19-pre1/arch/arm/defconfig
 ===================================================================
 --- linux-2.4.19-pre1.orig/arch/arm/defconfig  2001-05-20 04:43:05.000000000 +0400
-+++ linux-2.4.19-pre1/arch/arm/defconfig       2003-11-21 03:51:05.000000000 +0300
++++ linux-2.4.19-pre1/arch/arm/defconfig       2004-01-14 01:11:49.000000000 +0300
 @@ -1,6 +1,13 @@
  #
  # Automatically generated make config: don't edit
@@ -208,7 +208,7 @@ Index: linux-2.4.19-pre1/arch/arm/defconfig
 Index: linux-2.4.19-pre1/arch/arm/kernel/calls.S
 ===================================================================
 --- linux-2.4.19-pre1.orig/arch/arm/kernel/calls.S     2001-10-08 21:39:18.000000000 +0400
-+++ linux-2.4.19-pre1/arch/arm/kernel/calls.S  2003-11-21 03:51:05.000000000 +0300
++++ linux-2.4.19-pre1/arch/arm/kernel/calls.S  2004-01-14 01:11:49.000000000 +0300
 @@ -236,6 +236,22 @@
                .long   SYMBOL_NAME(sys_mincore)
  /* 220 */     .long   SYMBOL_NAME(sys_madvise)
@@ -234,8 +234,8 @@ Index: linux-2.4.19-pre1/arch/arm/kernel/calls.S
                .rept   NR_syscalls - (__syscall_end - __syscall_start) / 4
 Index: linux-2.4.19-pre1/arch/i386/defconfig
 ===================================================================
---- linux-2.4.19-pre1.orig/arch/i386/defconfig 2003-11-20 19:01:35.000000000 +0300
-+++ linux-2.4.19-pre1/arch/i386/defconfig      2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/arch/i386/defconfig 2004-01-14 01:10:36.000000000 +0300
++++ linux-2.4.19-pre1/arch/i386/defconfig      2004-01-14 01:11:49.000000000 +0300
 @@ -1,6 +1,13 @@
  #
  # Automatically generated make config: don't edit
@@ -250,10 +250,45 @@ Index: linux-2.4.19-pre1/arch/i386/defconfig
  CONFIG_X86=y
  CONFIG_ISA=y
  # CONFIG_SBUS is not set
+Index: linux-2.4.19-pre1/arch/i386/kernel/entry.S
+===================================================================
+--- linux-2.4.19-pre1.orig/arch/i386/kernel/entry.S    2004-01-14 01:11:46.000000000 +0300
++++ linux-2.4.19-pre1/arch/i386/kernel/entry.S 2004-01-14 01:11:49.000000000 +0300
+@@ -619,18 +619,18 @@
+       .long SYMBOL_NAME(sys_ni_syscall)       /* Reserved for Security */
+       .long SYMBOL_NAME(sys_gettid)
+       .long SYMBOL_NAME(sys_readahead)        /* 225 */
+-      .long SYMBOL_NAME(sys_ni_syscall)       /* reserved for setxattr */
+-      .long SYMBOL_NAME(sys_ni_syscall)       /* reserved for lsetxattr */
+-      .long SYMBOL_NAME(sys_ni_syscall)       /* reserved for fsetxattr */
+-      .long SYMBOL_NAME(sys_ni_syscall)       /* reserved for getxattr */
+-      .long SYMBOL_NAME(sys_ni_syscall)       /* 230 reserved for lgetxattr */
+-      .long SYMBOL_NAME(sys_ni_syscall)       /* reserved for fgetxattr */
+-      .long SYMBOL_NAME(sys_ni_syscall)       /* reserved for listxattr */
+-      .long SYMBOL_NAME(sys_ni_syscall)       /* reserved for llistxattr */
+-      .long SYMBOL_NAME(sys_ni_syscall)       /* reserved for flistxattr */
+-      .long SYMBOL_NAME(sys_ni_syscall)       /* 235 reserved for removexattr */
+-      .long SYMBOL_NAME(sys_ni_syscall)       /* reserved for lremovexattr */
+-      .long SYMBOL_NAME(sys_ni_syscall)       /* reserved for fremovexattr */
++      .long SYMBOL_NAME(sys_setxattr)
++      .long SYMBOL_NAME(sys_lsetxattr)
++      .long SYMBOL_NAME(sys_fsetxattr)
++      .long SYMBOL_NAME(sys_getxattr)
++      .long SYMBOL_NAME(sys_lgetxattr)        /* 230 */
++      .long SYMBOL_NAME(sys_fgetxattr)
++      .long SYMBOL_NAME(sys_listxattr)
++      .long SYMBOL_NAME(sys_llistxattr)
++      .long SYMBOL_NAME(sys_flistxattr)
++      .long SYMBOL_NAME(sys_removexattr)      /* 235 */
++      .long SYMBOL_NAME(sys_lremovexattr)
++      .long SYMBOL_NAME(sys_fremovexattr)
+       .rept NR_syscalls-(.-sys_call_table)/4
+               .long SYMBOL_NAME(sys_ni_syscall)
 Index: linux-2.4.19-pre1/arch/ia64/defconfig
 ===================================================================
 --- linux-2.4.19-pre1.orig/arch/ia64/defconfig 2001-11-10 01:26:17.000000000 +0300
-+++ linux-2.4.19-pre1/arch/ia64/defconfig      2003-11-21 03:51:05.000000000 +0300
++++ linux-2.4.19-pre1/arch/ia64/defconfig      2004-01-14 01:11:49.000000000 +0300
 @@ -1,6 +1,13 @@
  #
  # Automatically generated make config: don't edit
@@ -271,7 +306,7 @@ Index: linux-2.4.19-pre1/arch/ia64/defconfig
 Index: linux-2.4.19-pre1/arch/ia64/kernel/entry.S
 ===================================================================
 --- linux-2.4.19-pre1.orig/arch/ia64/kernel/entry.S    2001-11-10 01:26:17.000000000 +0300
-+++ linux-2.4.19-pre1/arch/ia64/kernel/entry.S 2003-11-21 03:51:05.000000000 +0300
++++ linux-2.4.19-pre1/arch/ia64/kernel/entry.S 2004-01-14 01:11:49.000000000 +0300
 @@ -1130,18 +1130,18 @@
        data8 sys_getdents64
        data8 sys_getunwind                     // 1215
@@ -306,7 +341,7 @@ Index: linux-2.4.19-pre1/arch/ia64/kernel/entry.S
 Index: linux-2.4.19-pre1/arch/m68k/defconfig
 ===================================================================
 --- linux-2.4.19-pre1.orig/arch/m68k/defconfig 2000-06-19 23:56:08.000000000 +0400
-+++ linux-2.4.19-pre1/arch/m68k/defconfig      2003-11-21 03:51:05.000000000 +0300
++++ linux-2.4.19-pre1/arch/m68k/defconfig      2004-01-14 01:11:49.000000000 +0300
 @@ -1,6 +1,13 @@
  #
  # Automatically generated make config: don't edit
@@ -324,7 +359,7 @@ Index: linux-2.4.19-pre1/arch/m68k/defconfig
 Index: linux-2.4.19-pre1/arch/mips/defconfig
 ===================================================================
 --- linux-2.4.19-pre1.orig/arch/mips/defconfig 2001-09-09 21:43:02.000000000 +0400
-+++ linux-2.4.19-pre1/arch/mips/defconfig      2003-11-21 03:51:05.000000000 +0300
++++ linux-2.4.19-pre1/arch/mips/defconfig      2004-01-14 01:11:49.000000000 +0300
 @@ -1,6 +1,13 @@
  #
  # Automatically generated make config: don't edit
@@ -342,7 +377,7 @@ Index: linux-2.4.19-pre1/arch/mips/defconfig
 Index: linux-2.4.19-pre1/arch/mips64/defconfig
 ===================================================================
 --- linux-2.4.19-pre1.orig/arch/mips64/defconfig       2001-09-09 21:43:02.000000000 +0400
-+++ linux-2.4.19-pre1/arch/mips64/defconfig    2003-11-21 03:51:05.000000000 +0300
++++ linux-2.4.19-pre1/arch/mips64/defconfig    2004-01-14 01:11:49.000000000 +0300
 @@ -1,6 +1,13 @@
  #
  # Automatically generated make config: don't edit
@@ -359,8 +394,8 @@ Index: linux-2.4.19-pre1/arch/mips64/defconfig
  # Code maturity level options
 Index: linux-2.4.19-pre1/arch/ppc/defconfig
 ===================================================================
---- linux-2.4.19-pre1.orig/arch/ppc/defconfig  2003-11-20 19:01:35.000000000 +0300
-+++ linux-2.4.19-pre1/arch/ppc/defconfig       2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/arch/ppc/defconfig  2004-01-14 01:10:36.000000000 +0300
++++ linux-2.4.19-pre1/arch/ppc/defconfig       2004-01-14 01:11:49.000000000 +0300
 @@ -1,6 +1,20 @@
  #
  # Automatically generated make config: don't edit
@@ -384,8 +419,8 @@ Index: linux-2.4.19-pre1/arch/ppc/defconfig
  CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 Index: linux-2.4.19-pre1/arch/s390/defconfig
 ===================================================================
---- linux-2.4.19-pre1.orig/arch/s390/defconfig 2003-11-20 19:01:35.000000000 +0300
-+++ linux-2.4.19-pre1/arch/s390/defconfig      2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/arch/s390/defconfig 2004-01-14 01:10:36.000000000 +0300
++++ linux-2.4.19-pre1/arch/s390/defconfig      2004-01-14 01:11:49.000000000 +0300
 @@ -1,6 +1,13 @@
  #
  # Automatically generated make config: don't edit
@@ -402,8 +437,8 @@ Index: linux-2.4.19-pre1/arch/s390/defconfig
  # CONFIG_MCA is not set
 Index: linux-2.4.19-pre1/arch/s390/kernel/entry.S
 ===================================================================
---- linux-2.4.19-pre1.orig/arch/s390/kernel/entry.S    2003-11-20 19:01:35.000000000 +0300
-+++ linux-2.4.19-pre1/arch/s390/kernel/entry.S 2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/arch/s390/kernel/entry.S    2004-01-14 01:10:36.000000000 +0300
++++ linux-2.4.19-pre1/arch/s390/kernel/entry.S 2004-01-14 01:11:49.000000000 +0300
 @@ -599,8 +599,19 @@
          .long  sys_fcntl64 
        .long  sys_ni_syscall            /* 222 - reserved for posix_acl */
@@ -428,8 +463,8 @@ Index: linux-2.4.19-pre1/arch/s390/kernel/entry.S
  
 Index: linux-2.4.19-pre1/arch/s390x/defconfig
 ===================================================================
---- linux-2.4.19-pre1.orig/arch/s390x/defconfig        2003-11-20 19:01:35.000000000 +0300
-+++ linux-2.4.19-pre1/arch/s390x/defconfig     2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/arch/s390x/defconfig        2004-01-14 01:10:36.000000000 +0300
++++ linux-2.4.19-pre1/arch/s390x/defconfig     2004-01-14 01:11:49.000000000 +0300
 @@ -1,6 +1,13 @@
  #
  # Automatically generated make config: don't edit
@@ -446,8 +481,8 @@ Index: linux-2.4.19-pre1/arch/s390x/defconfig
  # CONFIG_MCA is not set
 Index: linux-2.4.19-pre1/arch/s390x/kernel/entry.S
 ===================================================================
---- linux-2.4.19-pre1.orig/arch/s390x/kernel/entry.S   2003-11-20 19:01:35.000000000 +0300
-+++ linux-2.4.19-pre1/arch/s390x/kernel/entry.S        2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/arch/s390x/kernel/entry.S   2004-01-14 01:10:36.000000000 +0300
++++ linux-2.4.19-pre1/arch/s390x/kernel/entry.S        2004-01-14 01:11:49.000000000 +0300
 @@ -632,8 +632,19 @@
        .long  SYSCALL(sys_ni_syscall,sys32_fcntl64_wrapper)
        .long  SYSCALL(sys_ni_syscall,sys_ni_syscall) /* 222 - reserved for posix_acl */
@@ -472,8 +507,8 @@ Index: linux-2.4.19-pre1/arch/s390x/kernel/entry.S
  
 Index: linux-2.4.19-pre1/arch/s390x/kernel/wrapper32.S
 ===================================================================
---- linux-2.4.19-pre1.orig/arch/s390x/kernel/wrapper32.S       2003-11-20 19:01:35.000000000 +0300
-+++ linux-2.4.19-pre1/arch/s390x/kernel/wrapper32.S    2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/arch/s390x/kernel/wrapper32.S       2004-01-14 01:10:36.000000000 +0300
++++ linux-2.4.19-pre1/arch/s390x/kernel/wrapper32.S    2004-01-14 01:11:49.000000000 +0300
 @@ -1091,3 +1091,95 @@
        llgtr   %r3,%r3                 # struct stat64 *
        llgfr   %r4,%r4                 # long
@@ -572,8 +607,8 @@ Index: linux-2.4.19-pre1/arch/s390x/kernel/wrapper32.S
 +
 Index: linux-2.4.19-pre1/arch/sparc/defconfig
 ===================================================================
---- linux-2.4.19-pre1.orig/arch/sparc/defconfig        2003-11-20 19:01:35.000000000 +0300
-+++ linux-2.4.19-pre1/arch/sparc/defconfig     2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/arch/sparc/defconfig        2004-01-14 01:10:36.000000000 +0300
++++ linux-2.4.19-pre1/arch/sparc/defconfig     2004-01-14 01:11:49.000000000 +0300
 @@ -1,6 +1,13 @@
  #
  # Automatically generated make config: don't edit
@@ -591,7 +626,7 @@ Index: linux-2.4.19-pre1/arch/sparc/defconfig
 Index: linux-2.4.19-pre1/arch/sparc/kernel/systbls.S
 ===================================================================
 --- linux-2.4.19-pre1.orig/arch/sparc/kernel/systbls.S 2001-10-21 21:36:54.000000000 +0400
-+++ linux-2.4.19-pre1/arch/sparc/kernel/systbls.S      2003-11-21 03:51:05.000000000 +0300
++++ linux-2.4.19-pre1/arch/sparc/kernel/systbls.S      2004-01-14 01:11:49.000000000 +0300
 @@ -51,11 +51,11 @@
  /*150*/       .long sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys_poll, sys_getdents64
  /*155*/       .long sys_fcntl64, sys_nis_syscall, sys_statfs, sys_fstatfs, sys_oldumount
@@ -611,8 +646,8 @@ Index: linux-2.4.19-pre1/arch/sparc/kernel/systbls.S
  /*200*/       .long sys_ssetmask, sys_sigsuspend, sys_newlstat, sys_uselib, old_readdir
 Index: linux-2.4.19-pre1/arch/sparc64/defconfig
 ===================================================================
---- linux-2.4.19-pre1.orig/arch/sparc64/defconfig      2003-11-20 19:01:35.000000000 +0300
-+++ linux-2.4.19-pre1/arch/sparc64/defconfig   2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/arch/sparc64/defconfig      2004-01-14 01:10:36.000000000 +0300
++++ linux-2.4.19-pre1/arch/sparc64/defconfig   2004-01-14 01:11:49.000000000 +0300
 @@ -1,6 +1,13 @@
  #
  # Automatically generated make config: don't edit
@@ -630,7 +665,7 @@ Index: linux-2.4.19-pre1/arch/sparc64/defconfig
 Index: linux-2.4.19-pre1/arch/sparc64/kernel/systbls.S
 ===================================================================
 --- linux-2.4.19-pre1.orig/arch/sparc64/kernel/systbls.S       2001-10-21 21:36:54.000000000 +0400
-+++ linux-2.4.19-pre1/arch/sparc64/kernel/systbls.S    2003-11-21 03:51:05.000000000 +0300
++++ linux-2.4.19-pre1/arch/sparc64/kernel/systbls.S    2004-01-14 01:11:49.000000000 +0300
 @@ -52,11 +52,11 @@
  /*150*/       .word sys_nis_syscall, sys_nis_syscall, sys_nis_syscall, sys_poll, sys_getdents64
        .word sys32_fcntl64, sys_nis_syscall, sys32_statfs, sys32_fstatfs, sys_oldumount
@@ -667,8 +702,8 @@ Index: linux-2.4.19-pre1/arch/sparc64/kernel/systbls.S
  /*200*/       .word sys_ssetmask, sys_nis_syscall, sys_newlstat, sys_uselib, sys_nis_syscall
 Index: linux-2.4.19-pre1/fs/Config.in
 ===================================================================
---- linux-2.4.19-pre1.orig/fs/Config.in        2003-11-20 19:01:36.000000000 +0300
-+++ linux-2.4.19-pre1/fs/Config.in     2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/fs/Config.in        2004-01-14 01:10:37.000000000 +0300
++++ linux-2.4.19-pre1/fs/Config.in     2004-01-14 01:11:49.000000000 +0300
 @@ -22,6 +22,11 @@
  dep_tristate 'BFS file system support (EXPERIMENTAL)' CONFIG_BFS_FS $CONFIG_EXPERIMENTAL
  
@@ -706,8 +741,8 @@ Index: linux-2.4.19-pre1/fs/Config.in
  source fs/partitions/Config.in
 Index: linux-2.4.19-pre1/fs/Makefile
 ===================================================================
---- linux-2.4.19-pre1.orig/fs/Makefile 2003-11-21 03:51:01.000000000 +0300
-+++ linux-2.4.19-pre1/fs/Makefile      2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/fs/Makefile 2004-01-14 01:11:49.000000000 +0300
++++ linux-2.4.19-pre1/fs/Makefile      2004-01-14 01:11:49.000000000 +0300
 @@ -14,7 +14,7 @@
                super.o block_dev.o char_dev.o stat.o exec.o pipe.o namei.o \
                fcntl.o ioctl.o readdir.o select.o fifo.o locks.o \
@@ -730,7 +765,7 @@ Index: linux-2.4.19-pre1/fs/Makefile
 Index: linux-2.4.19-pre1/fs/ext2/Makefile
 ===================================================================
 --- linux-2.4.19-pre1.orig/fs/ext2/Makefile    2001-10-11 19:05:18.000000000 +0400
-+++ linux-2.4.19-pre1/fs/ext2/Makefile 2003-11-21 03:51:05.000000000 +0300
++++ linux-2.4.19-pre1/fs/ext2/Makefile 2004-01-14 01:11:49.000000000 +0300
 @@ -13,4 +13,8 @@
                ioctl.o namei.o super.o symlink.o
  obj-m    := $(O_TARGET)
@@ -743,7 +778,7 @@ Index: linux-2.4.19-pre1/fs/ext2/Makefile
 Index: linux-2.4.19-pre1/fs/ext2/file.c
 ===================================================================
 --- linux-2.4.19-pre1.orig/fs/ext2/file.c      2001-10-11 19:05:18.000000000 +0400
-+++ linux-2.4.19-pre1/fs/ext2/file.c   2003-11-21 03:51:05.000000000 +0300
++++ linux-2.4.19-pre1/fs/ext2/file.c   2004-01-14 01:11:49.000000000 +0300
 @@ -20,6 +20,7 @@
  
  #include <linux/fs.h>
@@ -763,8 +798,8 @@ Index: linux-2.4.19-pre1/fs/ext2/file.c
  };
 Index: linux-2.4.19-pre1/fs/ext2/ialloc.c
 ===================================================================
---- linux-2.4.19-pre1.orig/fs/ext2/ialloc.c    2003-11-20 19:01:36.000000000 +0300
-+++ linux-2.4.19-pre1/fs/ext2/ialloc.c 2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/fs/ext2/ialloc.c    2004-01-14 01:10:37.000000000 +0300
++++ linux-2.4.19-pre1/fs/ext2/ialloc.c 2004-01-14 01:11:49.000000000 +0300
 @@ -15,6 +15,7 @@
  #include <linux/config.h>
  #include <linux/fs.h>
@@ -783,8 +818,8 @@ Index: linux-2.4.19-pre1/fs/ext2/ialloc.c
        }
 Index: linux-2.4.19-pre1/fs/ext2/inode.c
 ===================================================================
---- linux-2.4.19-pre1.orig/fs/ext2/inode.c     2003-11-20 19:01:36.000000000 +0300
-+++ linux-2.4.19-pre1/fs/ext2/inode.c  2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/fs/ext2/inode.c     2004-01-14 01:10:37.000000000 +0300
++++ linux-2.4.19-pre1/fs/ext2/inode.c  2004-01-14 01:11:49.000000000 +0300
 @@ -39,6 +39,18 @@
  static int ext2_update_inode(struct inode * inode, int do_sync);
  
@@ -870,7 +905,7 @@ Index: linux-2.4.19-pre1/fs/ext2/inode.c
 Index: linux-2.4.19-pre1/fs/ext2/namei.c
 ===================================================================
 --- linux-2.4.19-pre1.orig/fs/ext2/namei.c     2001-10-04 09:57:36.000000000 +0400
-+++ linux-2.4.19-pre1/fs/ext2/namei.c  2003-11-21 03:51:05.000000000 +0300
++++ linux-2.4.19-pre1/fs/ext2/namei.c  2004-01-14 01:11:49.000000000 +0300
 @@ -31,6 +31,7 @@
  
  #include <linux/fs.h>
@@ -906,8 +941,8 @@ Index: linux-2.4.19-pre1/fs/ext2/namei.c
  };
 Index: linux-2.4.19-pre1/fs/ext2/super.c
 ===================================================================
---- linux-2.4.19-pre1.orig/fs/ext2/super.c     2003-11-20 19:01:36.000000000 +0300
-+++ linux-2.4.19-pre1/fs/ext2/super.c  2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/fs/ext2/super.c     2004-01-14 01:10:37.000000000 +0300
++++ linux-2.4.19-pre1/fs/ext2/super.c  2004-01-14 01:11:49.000000000 +0300
 @@ -21,6 +21,7 @@
  #include <linux/string.h>
  #include <linux/fs.h>
@@ -980,7 +1015,7 @@ Index: linux-2.4.19-pre1/fs/ext2/super.c
 Index: linux-2.4.19-pre1/fs/ext2/symlink.c
 ===================================================================
 --- linux-2.4.19-pre1.orig/fs/ext2/symlink.c   2000-09-28 00:41:33.000000000 +0400
-+++ linux-2.4.19-pre1/fs/ext2/symlink.c        2003-11-21 03:51:05.000000000 +0300
++++ linux-2.4.19-pre1/fs/ext2/symlink.c        2004-01-14 01:11:49.000000000 +0300
 @@ -19,6 +19,7 @@
  
  #include <linux/fs.h>
@@ -1012,8 +1047,8 @@ Index: linux-2.4.19-pre1/fs/ext2/symlink.c
  };
 Index: linux-2.4.19-pre1/fs/ext2/xattr.c
 ===================================================================
---- linux-2.4.19-pre1.orig/fs/ext2/xattr.c     2003-11-21 03:51:05.000000000 +0300
-+++ linux-2.4.19-pre1/fs/ext2/xattr.c  2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/fs/ext2/xattr.c     2003-01-30 13:24:37.000000000 +0300
++++ linux-2.4.19-pre1/fs/ext2/xattr.c  2004-01-14 01:11:49.000000000 +0300
 @@ -0,0 +1,1212 @@
 +/*
 + * linux/fs/ext2/xattr.c
@@ -2229,8 +2264,8 @@ Index: linux-2.4.19-pre1/fs/ext2/xattr.c
 +#endif  /* CONFIG_EXT2_FS_XATTR_SHARING */
 Index: linux-2.4.19-pre1/fs/ext2/xattr_user.c
 ===================================================================
---- linux-2.4.19-pre1.orig/fs/ext2/xattr_user.c        2003-11-21 03:51:05.000000000 +0300
-+++ linux-2.4.19-pre1/fs/ext2/xattr_user.c     2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/fs/ext2/xattr_user.c        2003-01-30 13:24:37.000000000 +0300
++++ linux-2.4.19-pre1/fs/ext2/xattr_user.c     2004-01-14 01:11:49.000000000 +0300
 @@ -0,0 +1,103 @@
 +/*
 + * linux/fs/ext2/xattr_user.c
@@ -2337,8 +2372,8 @@ Index: linux-2.4.19-pre1/fs/ext2/xattr_user.c
 +}
 Index: linux-2.4.19-pre1/fs/ext3/Makefile
 ===================================================================
---- linux-2.4.19-pre1.orig/fs/ext3/Makefile    2003-11-21 03:51:02.000000000 +0300
-+++ linux-2.4.19-pre1/fs/ext3/Makefile 2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/fs/ext3/Makefile    2004-01-14 01:11:49.000000000 +0300
++++ linux-2.4.19-pre1/fs/ext3/Makefile 2004-01-14 01:11:49.000000000 +0300
 @@ -1,5 +1,5 @@
  #
 -# Makefile for the linux ext2-filesystem routines.
@@ -2365,8 +2400,8 @@ Index: linux-2.4.19-pre1/fs/ext3/Makefile
  include $(TOPDIR)/Rules.make
 Index: linux-2.4.19-pre1/fs/ext3/file.c
 ===================================================================
---- linux-2.4.19-pre1.orig/fs/ext3/file.c      2003-11-21 03:51:02.000000000 +0300
-+++ linux-2.4.19-pre1/fs/ext3/file.c   2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/fs/ext3/file.c      2004-01-14 01:11:49.000000000 +0300
++++ linux-2.4.19-pre1/fs/ext3/file.c   2004-01-14 01:11:49.000000000 +0300
 @@ -23,6 +23,7 @@
  #include <linux/locks.h>
  #include <linux/jbd.h>
@@ -2387,8 +2422,8 @@ Index: linux-2.4.19-pre1/fs/ext3/file.c
  
 Index: linux-2.4.19-pre1/fs/ext3/ialloc.c
 ===================================================================
---- linux-2.4.19-pre1.orig/fs/ext3/ialloc.c    2003-11-20 19:01:36.000000000 +0300
-+++ linux-2.4.19-pre1/fs/ext3/ialloc.c 2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/fs/ext3/ialloc.c    2004-01-14 01:10:37.000000000 +0300
++++ linux-2.4.19-pre1/fs/ext3/ialloc.c 2004-01-14 01:11:49.000000000 +0300
 @@ -17,6 +17,7 @@
  #include <linux/jbd.h>
  #include <linux/ext3_fs.h>
@@ -2407,8 +2442,8 @@ Index: linux-2.4.19-pre1/fs/ext3/ialloc.c
  
 Index: linux-2.4.19-pre1/fs/ext3/inode.c
 ===================================================================
---- linux-2.4.19-pre1.orig/fs/ext3/inode.c     2003-11-20 19:01:36.000000000 +0300
-+++ linux-2.4.19-pre1/fs/ext3/inode.c  2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/fs/ext3/inode.c     2004-01-14 01:10:37.000000000 +0300
++++ linux-2.4.19-pre1/fs/ext3/inode.c  2004-01-14 01:11:49.000000000 +0300
 @@ -39,6 +39,18 @@
   */
  #undef SEARCH_FROM_ZERO
@@ -2501,8 +2536,8 @@ Index: linux-2.4.19-pre1/fs/ext3/inode.c
                /* inode->i_attr_flags |= ATTR_FLAG_SYNCRONOUS; unused */
 Index: linux-2.4.19-pre1/fs/ext3/namei.c
 ===================================================================
---- linux-2.4.19-pre1.orig/fs/ext3/namei.c     2003-11-21 03:51:02.000000000 +0300
-+++ linux-2.4.19-pre1/fs/ext3/namei.c  2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/fs/ext3/namei.c     2004-01-14 01:11:49.000000000 +0300
++++ linux-2.4.19-pre1/fs/ext3/namei.c  2004-01-14 01:11:49.000000000 +0300
 @@ -29,6 +29,7 @@
  #include <linux/sched.h>
  #include <linux/ext3_fs.h>
@@ -2566,8 +2601,8 @@ Index: linux-2.4.19-pre1/fs/ext3/namei.c
 +
 Index: linux-2.4.19-pre1/fs/ext3/super.c
 ===================================================================
---- linux-2.4.19-pre1.orig/fs/ext3/super.c     2003-11-21 03:51:02.000000000 +0300
-+++ linux-2.4.19-pre1/fs/ext3/super.c  2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/fs/ext3/super.c     2004-01-14 01:11:49.000000000 +0300
++++ linux-2.4.19-pre1/fs/ext3/super.c  2004-01-14 01:11:49.000000000 +0300
 @@ -24,6 +24,7 @@
  #include <linux/jbd.h>
  #include <linux/ext3_fs.h>
@@ -2656,7 +2691,7 @@ Index: linux-2.4.19-pre1/fs/ext3/super.c
 Index: linux-2.4.19-pre1/fs/ext3/symlink.c
 ===================================================================
 --- linux-2.4.19-pre1.orig/fs/ext3/symlink.c   2001-11-10 01:25:04.000000000 +0300
-+++ linux-2.4.19-pre1/fs/ext3/symlink.c        2003-11-21 03:51:05.000000000 +0300
++++ linux-2.4.19-pre1/fs/ext3/symlink.c        2004-01-14 01:11:49.000000000 +0300
 @@ -20,6 +20,7 @@
  #include <linux/fs.h>
  #include <linux/jbd.h>
@@ -2688,8 +2723,8 @@ Index: linux-2.4.19-pre1/fs/ext3/symlink.c
  };
 Index: linux-2.4.19-pre1/fs/ext3/xattr.c
 ===================================================================
---- linux-2.4.19-pre1.orig/fs/ext3/xattr.c     2003-11-21 03:51:05.000000000 +0300
-+++ linux-2.4.19-pre1/fs/ext3/xattr.c  2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/fs/ext3/xattr.c     2003-01-30 13:24:37.000000000 +0300
++++ linux-2.4.19-pre1/fs/ext3/xattr.c  2004-01-14 01:11:49.000000000 +0300
 @@ -0,0 +1,1225 @@
 +/*
 + * linux/fs/ext3/xattr.c
@@ -3918,8 +3953,8 @@ Index: linux-2.4.19-pre1/fs/ext3/xattr.c
 +#endif  /* CONFIG_EXT3_FS_XATTR_SHARING */
 Index: linux-2.4.19-pre1/fs/ext3/xattr_user.c
 ===================================================================
---- linux-2.4.19-pre1.orig/fs/ext3/xattr_user.c        2003-11-21 03:51:05.000000000 +0300
-+++ linux-2.4.19-pre1/fs/ext3/xattr_user.c     2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/fs/ext3/xattr_user.c        2003-01-30 13:24:37.000000000 +0300
++++ linux-2.4.19-pre1/fs/ext3/xattr_user.c     2004-01-14 01:11:49.000000000 +0300
 @@ -0,0 +1,111 @@
 +/*
 + * linux/fs/ext3/xattr_user.c
@@ -4032,10 +4067,28 @@ Index: linux-2.4.19-pre1/fs/ext3/xattr_user.c
 +      ext3_xattr_unregister(EXT3_XATTR_INDEX_USER,
 +                            &ext3_xattr_user_handler);
 +}
+Index: linux-2.4.19-pre1/fs/ext3/ext3-exports.c
+===================================================================
+--- linux-2.4.19-pre1.orig/fs/ext3/ext3-exports.c      2003-01-30 13:24:37.000000000 +0300
++++ linux-2.4.19-pre1/fs/ext3/ext3-exports.c   2004-01-14 01:11:49.000000000 +0300
+@@ -0,0 +1,13 @@
++#include <linux/config.h>
++#include <linux/module.h>
++#include <linux/ext3_fs.h>
++#include <linux/ext3_jbd.h>
++#include <linux/ext3_xattr.h>
++
++EXPORT_SYMBOL(ext3_force_commit);
++EXPORT_SYMBOL(ext3_bread);
++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.19-pre1/fs/mbcache.c
 ===================================================================
---- linux-2.4.19-pre1.orig/fs/mbcache.c        2003-11-21 03:51:05.000000000 +0300
-+++ linux-2.4.19-pre1/fs/mbcache.c     2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/fs/mbcache.c        2003-01-30 13:24:37.000000000 +0300
++++ linux-2.4.19-pre1/fs/mbcache.c     2004-01-14 01:11:49.000000000 +0300
 @@ -0,0 +1,648 @@
 +/*
 + * linux/fs/mbcache.c
@@ -4685,489 +4738,601 @@ Index: linux-2.4.19-pre1/fs/mbcache.c
 +module_init(init_mbcache)
 +module_exit(exit_mbcache)
 +
-Index: linux-2.4.19-pre1/include/asm-arm/unistd.h
-===================================================================
---- linux-2.4.19-pre1.orig/include/asm-arm/unistd.h    2001-08-12 22:14:00.000000000 +0400
-+++ linux-2.4.19-pre1/include/asm-arm/unistd.h 2003-11-21 03:51:05.000000000 +0300
-@@ -240,6 +240,18 @@
- #define __NR_mincore                  (__NR_SYSCALL_BASE+219)
- #define __NR_madvise                  (__NR_SYSCALL_BASE+220)
- #define __NR_fcntl64                  (__NR_SYSCALL_BASE+221)
-+#define __NR_setxattr                 (__NR_SYSCALL_BASE+226)
-+#define __NR_lsetxattr                        (__NR_SYSCALL_BASE+227)
-+#define __NR_fsetxattr                        (__NR_SYSCALL_BASE+228)
-+#define __NR_getxattr                 (__NR_SYSCALL_BASE+229)
-+#define __NR_lgetxattr                        (__NR_SYSCALL_BASE+230)
-+#define __NR_fgetxattr                        (__NR_SYSCALL_BASE+231)
-+#define __NR_listxattr                        (__NR_SYSCALL_BASE+232)
-+#define __NR_llistxattr                       (__NR_SYSCALL_BASE+233)
-+#define __NR_flistxattr                       (__NR_SYSCALL_BASE+234)
-+#define __NR_removexattr              (__NR_SYSCALL_BASE+235)
-+#define __NR_lremovexattr             (__NR_SYSCALL_BASE+236)
-+#define __NR_fremovexattr             (__NR_SYSCALL_BASE+237)
- /*
-  * The following SWIs are ARM private.
-Index: linux-2.4.19-pre1/include/asm-ia64/unistd.h
-===================================================================
---- linux-2.4.19-pre1.orig/include/asm-ia64/unistd.h   2001-11-10 01:26:17.000000000 +0300
-+++ linux-2.4.19-pre1/include/asm-ia64/unistd.h        2003-11-21 03:51:05.000000000 +0300
-@@ -206,6 +206,18 @@
- #define __NR_getdents64                       1214
- #define __NR_getunwind                        1215
- #define __NR_readahead                        1216
-+#define __NR_setxattr                 1217
-+#define __NR_lsetxattr                        1218
-+#define __NR_fsetxattr                        1219
-+#define __NR_getxattr                 1220
-+#define __NR_lgetxattr                        1221
-+#define __NR_fgetxattr                        1222
-+#define __NR_listxattr                        1223
-+#define __NR_llistxattr                       1224
-+#define __NR_flistxattr                       1225
-+#define __NR_removexattr              1226
-+#define __NR_lremovexattr             1227
-+#define __NR_fremovexattr             1228
- #if !defined(__ASSEMBLY__) && !defined(ASSEMBLER)
-Index: linux-2.4.19-pre1/include/asm-s390/unistd.h
-===================================================================
---- linux-2.4.19-pre1.orig/include/asm-s390/unistd.h   2001-10-11 20:43:38.000000000 +0400
-+++ linux-2.4.19-pre1/include/asm-s390/unistd.h        2003-11-21 03:51:05.000000000 +0300
-@@ -211,6 +211,18 @@
- #define __NR_mincore            218
- #define __NR_madvise            219
- #define __NR_getdents64               220
-+#define __NR_setxattr         224
-+#define __NR_lsetxattr                225
-+#define __NR_fsetxattr                226
-+#define __NR_getxattr         227
-+#define __NR_lgetxattr                228
-+#define __NR_fgetxattr                229
-+#define __NR_listxattr                230
-+#define __NR_llistxattr               231
-+#define __NR_flistxattr               232
-+#define __NR_removexattr      233
-+#define __NR_lremovexattr     234
-+#define __NR_fremovexattr     235
- /* user-visible error numbers are in the range -1 - -122: see <asm-s390/errno.h> */
-Index: linux-2.4.19-pre1/include/asm-s390x/unistd.h
-===================================================================
---- linux-2.4.19-pre1.orig/include/asm-s390x/unistd.h  2001-10-11 20:43:38.000000000 +0400
-+++ linux-2.4.19-pre1/include/asm-s390x/unistd.h       2003-11-21 03:51:05.000000000 +0300
-@@ -181,6 +181,18 @@
- #define __NR_mincore            218
- #define __NR_madvise            219
- #define __NR_getdents64         220
-+#define __NR_setxattr         224
-+#define __NR_lsetxattr                225
-+#define __NR_fsetxattr                226
-+#define __NR_getxattr         227
-+#define __NR_lgetxattr                228
-+#define __NR_fgetxattr                229
-+#define __NR_listxattr                230
-+#define __NR_llistxattr               231
-+#define __NR_flistxattr               232
-+#define __NR_removexattr      233
-+#define __NR_lremovexattr     234
-+#define __NR_fremovexattr     235
- /* user-visible error numbers are in the range -1 - -122: see <asm-s390/errno.h> */
-Index: linux-2.4.19-pre1/include/asm-sparc/unistd.h
-===================================================================
---- linux-2.4.19-pre1.orig/include/asm-sparc/unistd.h  2001-10-21 21:36:54.000000000 +0400
-+++ linux-2.4.19-pre1/include/asm-sparc/unistd.h       2003-11-21 03:51:05.000000000 +0300
-@@ -184,24 +184,24 @@
- /* #define __NR_exportfs        166    SunOS Specific                              */
- #define __NR_mount              167 /* Common                                      */
- #define __NR_ustat              168 /* Common                                      */
--/* #define __NR_semsys          169    SunOS Specific                              */
--/* #define __NR_msgsys          170    SunOS Specific                              */
--/* #define __NR_shmsys          171    SunOS Specific                              */
--/* #define __NR_auditsys        172    SunOS Specific                              */
--/* #define __NR_rfssys          173    SunOS Specific                              */
-+#define __NR_setxattr           169 /* SunOS: semsys                               */
-+#define __NR_lsetxattr          170 /* SunOS: msgsys                               */
-+#define __NR_fsetxattr          171 /* SunOS: shmsys                               */
-+#define __NR_getxattr           172 /* SunOS: auditsys                             */
-+#define __NR_lgetxattr          173 /* SunOS: rfssys                               */
- #define __NR_getdents           174 /* Common                                      */
- #define __NR_setsid             175 /* Common                                      */
- #define __NR_fchdir             176 /* Common                                      */
--/* #define __NR_fchroot         177    SunOS Specific                              */
--/* #define __NR_vpixsys         178    SunOS Specific                              */
--/* #define __NR_aioread         179    SunOS Specific                              */
--/* #define __NR_aiowrite        180    SunOS Specific                              */
--/* #define __NR_aiowait         181    SunOS Specific                              */
--/* #define __NR_aiocancel       182    SunOS Specific                              */
-+#define __NR_fgetxattr          177 /* SunOS: fchroot                              */
-+#define __NR_listxattr          178 /* SunOS: vpixsys                              */
-+#define __NR_llistxattr         179 /* SunOS: aioread                              */
-+#define __NR_flistxattr         180 /* SunOS: aiowrite                             */
-+#define __NR_removexattr        181 /* SunOS: aiowait                              */
-+#define __NR_lremovexattr       182 /* SunOS: aiocancel                            */
- #define __NR_sigpending         183 /* Common                                      */
- #define __NR_query_module     184 /* Linux Specific                              */
- #define __NR_setpgid            185 /* Common                                      */
--/* #define __NR_pathconf        186    SunOS Specific                              */
-+#define __NR_fremovexattr       186 /* SunOS: pathconf                             */
- /* #define __NR_fpathconf       187    SunOS Specific                              */
- /* #define __NR_sysconf         188    SunOS Specific                              */
- #define __NR_uname              189 /* Linux Specific                              */
-Index: linux-2.4.19-pre1/include/asm-sparc64/unistd.h
-===================================================================
---- linux-2.4.19-pre1.orig/include/asm-sparc64/unistd.h        2001-10-21 21:36:54.000000000 +0400
-+++ linux-2.4.19-pre1/include/asm-sparc64/unistd.h     2003-11-21 03:51:05.000000000 +0300
-@@ -184,24 +184,24 @@
- /* #define __NR_exportfs        166    SunOS Specific                              */
- #define __NR_mount              167 /* Common                                      */
- #define __NR_ustat              168 /* Common                                      */
--/* #define __NR_semsys          169    SunOS Specific                              */
--/* #define __NR_msgsys          170    SunOS Specific                              */
--/* #define __NR_shmsys          171    SunOS Specific                              */
--/* #define __NR_auditsys        172    SunOS Specific                              */
--/* #define __NR_rfssys          173    SunOS Specific                              */
-+#define __NR_setxattr           169 /* SunOS: semsys                               */
-+#define __NR_lsetxattr          170 /* SunOS: msgsys                               */
-+#define __NR_fsetxattr          171 /* SunOS: shmsys                               */
-+#define __NR_getxattr           172 /* SunOS: auditsys                             */
-+#define __NR_lgetxattr          173 /* SunOS: rfssys                               */
- #define __NR_getdents           174 /* Common                                      */
- #define __NR_setsid             175 /* Common                                      */
- #define __NR_fchdir             176 /* Common                                      */
--/* #define __NR_fchroot         177    SunOS Specific                              */
--/* #define __NR_vpixsys         178    SunOS Specific                              */
--/* #define __NR_aioread         179    SunOS Specific                              */
--/* #define __NR_aiowrite        180    SunOS Specific                              */
--/* #define __NR_aiowait         181    SunOS Specific                              */
--/* #define __NR_aiocancel       182    SunOS Specific                              */
-+#define __NR_fgetxattr          177 /* SunOS: fchroot                              */
-+#define __NR_listxattr          178 /* SunOS: vpixsys                              */
-+#define __NR_llistxattr         179 /* SunOS: aioread                              */
-+#define __NR_flistxattr         180 /* SunOS: aiowrite                             */
-+#define __NR_removexattr        181 /* SunOS: aiowait                              */
-+#define __NR_lremovexattr       182 /* SunOS: aiocancel                            */
- #define __NR_sigpending         183 /* Common                                      */
- #define __NR_query_module     184 /* Linux Specific                              */
- #define __NR_setpgid            185 /* Common                                      */
--/* #define __NR_pathconf        186    SunOS Specific                              */
-+#define __NR_fremovexattr       186 /* SunOS: pathconf                             */
- /* #define __NR_fpathconf       187    SunOS Specific                              */
- /* #define __NR_sysconf         188    SunOS Specific                              */
- #define __NR_uname              189 /* Linux Specific                              */
-Index: linux-2.4.19-pre1/include/linux/cache_def.h
+Index: linux-2.4.19-pre1/fs/xattr.c
 ===================================================================
---- linux-2.4.19-pre1.orig/include/linux/cache_def.h   2003-11-21 03:51:05.000000000 +0300
-+++ linux-2.4.19-pre1/include/linux/cache_def.h        2003-11-21 03:51:05.000000000 +0300
-@@ -0,0 +1,15 @@
+--- linux-2.4.19-pre1.orig/fs/xattr.c  2003-01-30 13:24:37.000000000 +0300
++++ linux-2.4.19-pre1/fs/xattr.c       2004-01-14 01:11:49.000000000 +0300
+@@ -0,0 +1,355 @@
 +/*
-+ * linux/cache_def.h
-+ * Handling of caches defined in drivers, filesystems, ...
-+ *
-+ * Copyright (C) 2002 by Andreas Gruenbacher, <a.gruenbacher@computer.org>
-+ */
++  File: fs/xattr.c
 +
-+struct cache_definition {
-+      const char *name;
-+      void (*shrink)(int, unsigned int);
-+      struct list_head link;
-+};
++  Extended attribute handling.
 +
-+extern void register_cache(struct cache_definition *);
-+extern void unregister_cache(struct cache_definition *);
-Index: linux-2.4.19-pre1/include/linux/errno.h
-===================================================================
---- linux-2.4.19-pre1.orig/include/linux/errno.h       2001-02-10 01:46:13.000000000 +0300
-+++ linux-2.4.19-pre1/include/linux/errno.h    2003-11-21 03:51:05.000000000 +0300
-@@ -23,4 +23,8 @@
- #endif
-+/* Defined for extended attributes */
-+#define ENOATTR ENODATA               /* No such attribute */
-+#define ENOTSUP EOPNOTSUPP    /* Operation not supported */
++  Copyright (C) 2001 by Andreas Gruenbacher <a.gruenbacher@computer.org>
++  Copyright (C) 2001 SGI - Silicon Graphics, Inc <linux-xfs@oss.sgi.com>
++ */
++#include <linux/fs.h>
++#include <linux/slab.h>
++#include <linux/vmalloc.h>
++#include <linux/smp_lock.h>
++#include <linux/file.h>
++#include <linux/xattr.h>
++#include <asm/uaccess.h>
 +
- #endif
-Index: linux-2.4.19-pre1/include/linux/ext2_fs.h
-===================================================================
---- linux-2.4.19-pre1.orig/include/linux/ext2_fs.h     2001-11-22 22:46:52.000000000 +0300
-+++ linux-2.4.19-pre1/include/linux/ext2_fs.h  2003-11-21 03:51:05.000000000 +0300
-@@ -57,8 +57,6 @@
-  */
- #define       EXT2_BAD_INO             1      /* Bad blocks inode */
- #define EXT2_ROOT_INO          2      /* Root inode */
--#define EXT2_ACL_IDX_INO       3      /* ACL inode */
--#define EXT2_ACL_DATA_INO      4      /* ACL inode */
- #define EXT2_BOOT_LOADER_INO   5      /* Boot loader inode */
- #define EXT2_UNDEL_DIR_INO     6      /* Undelete directory inode */
-@@ -86,7 +84,6 @@
- #else
- # define EXT2_BLOCK_SIZE(s)           (EXT2_MIN_BLOCK_SIZE << (s)->s_log_block_size)
- #endif
--#define EXT2_ACLE_PER_BLOCK(s)                (EXT2_BLOCK_SIZE(s) / sizeof (struct ext2_acl_entry))
- #define       EXT2_ADDR_PER_BLOCK(s)          (EXT2_BLOCK_SIZE(s) / sizeof (__u32))
- #ifdef __KERNEL__
- # define EXT2_BLOCK_SIZE_BITS(s)      ((s)->s_blocksize_bits)
-@@ -121,28 +118,6 @@
- #endif
- /*
-- * ACL structures
-- */
--struct ext2_acl_header        /* Header of Access Control Lists */
--{
--      __u32   aclh_size;
--      __u32   aclh_file_count;
--      __u32   aclh_acle_count;
--      __u32   aclh_first_acle;
--};
--
--struct ext2_acl_entry /* Access Control List Entry */
--{
--      __u32   acle_size;
--      __u16   acle_perms;     /* Access permissions */
--      __u16   acle_type;      /* Type of entry */
--      __u16   acle_tag;       /* User or group identity */
--      __u16   acle_pad1;
--      __u32   acle_next;      /* Pointer on next entry for the */
--                                      /* same inode or on next free entry */
--};
--
--/*
-  * Structure of a blocks group descriptor
-  */
- struct ext2_group_desc
-@@ -314,6 +289,7 @@
- #define EXT2_MOUNT_ERRORS_PANIC               0x0040  /* Panic on errors */
- #define EXT2_MOUNT_MINIX_DF           0x0080  /* Mimics the Minix statfs */
- #define EXT2_MOUNT_NO_UID32           0x0200  /* Disable 32-bit UIDs */
-+#define EXT2_MOUNT_XATTR_USER         0x4000  /* Extended user attributes */
- #define clear_opt(o, opt)             o &= ~EXT2_MOUNT_##opt
- #define set_opt(o, opt)                       o |= EXT2_MOUNT_##opt
-@@ -397,6 +373,7 @@
- #ifdef __KERNEL__
- #define EXT2_SB(sb)   (&((sb)->u.ext2_sb))
-+#define EXT2_I(inode) (&((inode)->u.ext2_i))
- #else
- /* Assume that user mode programs are passing in an ext2fs superblock, not
-  * a kernel struct super_block.  This will allow us to call the feature-test
-@@ -466,7 +443,7 @@
- #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV     0x0008
- #define EXT2_FEATURE_INCOMPAT_ANY             0xffffffff
--#define EXT2_FEATURE_COMPAT_SUPP      0
-+#define EXT2_FEATURE_COMPAT_SUPP      EXT2_FEATURE_COMPAT_EXT_ATTR
- #define EXT2_FEATURE_INCOMPAT_SUPP    EXT2_FEATURE_INCOMPAT_FILETYPE
- #define EXT2_FEATURE_RO_COMPAT_SUPP   (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| \
-                                        EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \
-@@ -623,8 +600,10 @@
- /* namei.c */
- extern struct inode_operations ext2_dir_inode_operations;
-+extern struct inode_operations ext2_special_inode_operations;
- /* symlink.c */
-+extern struct inode_operations ext2_symlink_inode_operations;
- extern struct inode_operations ext2_fast_symlink_inode_operations;
- #endif        /* __KERNEL__ */
-Index: linux-2.4.19-pre1/include/linux/ext2_xattr.h
-===================================================================
---- linux-2.4.19-pre1.orig/include/linux/ext2_xattr.h  2003-11-21 03:51:05.000000000 +0300
-+++ linux-2.4.19-pre1/include/linux/ext2_xattr.h       2003-11-21 03:51:05.000000000 +0300
-@@ -0,0 +1,157 @@
 +/*
-+  File: linux/ext2_xattr.h
++ * Extended attribute memory allocation wrappers, originally
++ * based on the Intermezzo PRESTO_ALLOC/PRESTO_FREE macros.
++ * The vmalloc use here is very uncommon - extended attributes
++ * are supposed to be small chunks of metadata, and it is quite
++ * unusual to have very many extended attributes, so lists tend
++ * to be quite short as well.  The 64K upper limit is derived
++ * from the extended attribute size limit used by XFS.
++ * Intentionally allow zero @size for value/list size requests.
++ */
++static void *
++xattr_alloc(size_t size, size_t limit)
++{
++      void *ptr;
 +
-+  On-disk format of extended attributes for the ext2 filesystem.
++      if (size > limit)
++              return ERR_PTR(-E2BIG);
 +
-+  (C) 2001 Andreas Gruenbacher, <a.gruenbacher@computer.org>
-+*/
++      if (!size)      /* size request, no buffer is needed */
++              return NULL;
++      else if (size <= PAGE_SIZE)
++              ptr = kmalloc((unsigned long) size, GFP_KERNEL);
++      else
++              ptr = vmalloc((unsigned long) size);
++      if (!ptr)
++              return ERR_PTR(-ENOMEM);
++      return ptr;
++}
 +
-+#include <linux/config.h>
-+#include <linux/init.h>
-+#include <linux/xattr.h>
++static void
++xattr_free(void *ptr, size_t size)
++{
++      if (!size)      /* size request, no buffer was needed */
++              return;
++      else if (size <= PAGE_SIZE)
++              kfree(ptr);
++      else
++              vfree(ptr);
++}
 +
-+/* Magic value in attribute blocks */
-+#define EXT2_XATTR_MAGIC              0xEA020000
++/*
++ * Extended attribute SET operations
++ */
++static long
++setxattr(struct dentry *d, char *name, void *value, size_t size, int flags)
++{
++      int error;
++      void *kvalue;
++      char kname[XATTR_NAME_MAX + 1];
 +
-+/* Maximum number of references to one attribute block */
-+#define EXT2_XATTR_REFCOUNT_MAX               1024
++      if (flags & ~(XATTR_CREATE|XATTR_REPLACE))
++              return -EINVAL;
 +
-+/* Name indexes */
-+#define EXT2_XATTR_INDEX_MAX                  10
-+#define EXT2_XATTR_INDEX_USER                 1
-+#define EXT2_XATTR_INDEX_POSIX_ACL_ACCESS     2
-+#define EXT2_XATTR_INDEX_POSIX_ACL_DEFAULT    3
++      error = strncpy_from_user(kname, name, sizeof(kname));
++      if (error == 0 || error == sizeof(kname))
++              error = -ERANGE;
++      if (error < 0)
++              return error;
 +
-+struct ext2_xattr_header {
-+      __u32   h_magic;        /* magic number for identification */
-+      __u32   h_refcount;     /* reference count */
-+      __u32   h_blocks;       /* number of disk blocks used */
-+      __u32   h_hash;         /* hash value of all attributes */
-+      __u32   h_reserved[4];  /* zero right now */
-+};
++      kvalue = xattr_alloc(size, XATTR_SIZE_MAX);
++      if (IS_ERR(kvalue))
++              return PTR_ERR(kvalue);
 +
-+struct ext2_xattr_entry {
-+      __u8    e_name_len;     /* length of name */
-+      __u8    e_name_index;   /* attribute name index */
-+      __u16   e_value_offs;   /* offset in disk block of value */
-+      __u32   e_value_block;  /* disk block attribute is stored on (n/i) */
-+      __u32   e_value_size;   /* size of attribute value */
-+      __u32   e_hash;         /* hash value of name and value */
-+      char    e_name[0];      /* attribute name */
-+};
++      if (size > 0 && copy_from_user(kvalue, value, size)) {
++              xattr_free(kvalue, size);
++              return -EFAULT;
++      }
 +
-+#define EXT2_XATTR_PAD_BITS           2
-+#define EXT2_XATTR_PAD                (1<<EXT2_XATTR_PAD_BITS)
-+#define EXT2_XATTR_ROUND              (EXT2_XATTR_PAD-1)
-+#define EXT2_XATTR_LEN(name_len) \
-+      (((name_len) + EXT2_XATTR_ROUND + \
-+      sizeof(struct ext2_xattr_entry)) & ~EXT2_XATTR_ROUND)
-+#define EXT2_XATTR_NEXT(entry) \
-+      ( (struct ext2_xattr_entry *)( \
-+        (char *)(entry) + EXT2_XATTR_LEN((entry)->e_name_len)) )
-+#define EXT2_XATTR_SIZE(size) \
-+      (((size) + EXT2_XATTR_ROUND) & ~EXT2_XATTR_ROUND)
++      error = -EOPNOTSUPP;
++      if (d->d_inode->i_op && d->d_inode->i_op->setxattr) {
++              down(&d->d_inode->i_sem);
++              lock_kernel();
++              error = d->d_inode->i_op->setxattr(d, kname, kvalue, size, flags);
++              unlock_kernel();
++              up(&d->d_inode->i_sem);
++      }
 +
-+#ifdef __KERNEL__
++      xattr_free(kvalue, size);
++      return error;
++}
 +
-+# ifdef CONFIG_EXT2_FS_XATTR
++asmlinkage long
++sys_setxattr(char *path, char *name, void *value, size_t size, int flags)
++{
++      struct nameidata nd;
++      int error;
++
++      error = user_path_walk(path, &nd);
++      if (error)
++              return error;
++      error = setxattr(nd.dentry, name, value, size, flags);
++      path_release(&nd);
++      return error;
++}
++
++asmlinkage long
++sys_lsetxattr(char *path, char *name, void *value, size_t size, int flags)
++{
++      struct nameidata nd;
++      int error;
++
++      error = user_path_walk_link(path, &nd);
++      if (error)
++              return error;
++      error = setxattr(nd.dentry, name, value, size, flags);
++      path_release(&nd);
++      return error;
++}
++
++asmlinkage long
++sys_fsetxattr(int fd, char *name, void *value, size_t size, int flags)
++{
++      struct file *f;
++      int error = -EBADF;
++
++      f = fget(fd);
++      if (!f)
++              return error;
++      error = setxattr(f->f_dentry, name, value, size, flags);
++      fput(f);
++      return error;
++}
++
++/*
++ * Extended attribute GET operations
++ */
++static ssize_t
++getxattr(struct dentry *d, char *name, void *value, size_t size)
++{
++      ssize_t error;
++      void *kvalue;
++      char kname[XATTR_NAME_MAX + 1];
++
++      error = strncpy_from_user(kname, name, sizeof(kname));
++      if (error == 0 || error == sizeof(kname))
++              error = -ERANGE;
++      if (error < 0)
++              return error;
++
++      kvalue = xattr_alloc(size, XATTR_SIZE_MAX);
++      if (IS_ERR(kvalue))
++              return PTR_ERR(kvalue);
++
++      error = -EOPNOTSUPP;
++      if (d->d_inode->i_op && d->d_inode->i_op->getxattr) {
++              down(&d->d_inode->i_sem);
++              lock_kernel();
++              error = d->d_inode->i_op->getxattr(d, kname, kvalue, size);
++              unlock_kernel();
++              up(&d->d_inode->i_sem);
++      }
++
++      if (kvalue && error > 0)
++              if (copy_to_user(value, kvalue, error))
++                      error = -EFAULT;
++      xattr_free(kvalue, size);
++      return error;
++}
++
++asmlinkage ssize_t
++sys_getxattr(char *path, char *name, void *value, size_t size)
++{
++      struct nameidata nd;
++      ssize_t error;
++
++      error = user_path_walk(path, &nd);
++      if (error)
++              return error;
++      error = getxattr(nd.dentry, name, value, size);
++      path_release(&nd);
++      return error;
++}
++
++asmlinkage ssize_t
++sys_lgetxattr(char *path, char *name, void *value, size_t size)
++{
++      struct nameidata nd;
++      ssize_t error;
++
++      error = user_path_walk_link(path, &nd);
++      if (error)
++              return error;
++      error = getxattr(nd.dentry, name, value, size);
++      path_release(&nd);
++      return error;
++}
++
++asmlinkage ssize_t
++sys_fgetxattr(int fd, char *name, void *value, size_t size)
++{
++      struct file *f;
++      ssize_t error = -EBADF;
++
++      f = fget(fd);
++      if (!f)
++              return error;
++      error = getxattr(f->f_dentry, name, value, size);
++      fput(f);
++      return error;
++}
++
++/*
++ * Extended attribute LIST operations
++ */
++static ssize_t
++listxattr(struct dentry *d, char *list, size_t size)
++{
++      ssize_t error;
++      char *klist;
++
++      klist = (char *)xattr_alloc(size, XATTR_LIST_MAX);
++      if (IS_ERR(klist))
++              return PTR_ERR(klist);
++
++      error = -EOPNOTSUPP;
++      if (d->d_inode->i_op && d->d_inode->i_op->listxattr) {
++              down(&d->d_inode->i_sem);
++              lock_kernel();
++              error = d->d_inode->i_op->listxattr(d, klist, size);
++              unlock_kernel();
++              up(&d->d_inode->i_sem);
++      }
++
++      if (klist && error > 0)
++              if (copy_to_user(list, klist, error))
++                      error = -EFAULT;
++      xattr_free(klist, size);
++      return error;
++}
++
++asmlinkage ssize_t
++sys_listxattr(char *path, char *list, size_t size)
++{
++      struct nameidata nd;
++      ssize_t error;
++
++      error = user_path_walk(path, &nd);
++      if (error)
++              return error;
++      error = listxattr(nd.dentry, list, size);
++      path_release(&nd);
++      return error;
++}
++
++asmlinkage ssize_t
++sys_llistxattr(char *path, char *list, size_t size)
++{
++      struct nameidata nd;
++      ssize_t error;
++
++      error = user_path_walk_link(path, &nd);
++      if (error)
++              return error;
++      error = listxattr(nd.dentry, list, size);
++      path_release(&nd);
++      return error;
++}
++
++asmlinkage ssize_t
++sys_flistxattr(int fd, char *list, size_t size)
++{
++      struct file *f;
++      ssize_t error = -EBADF;
++
++      f = fget(fd);
++      if (!f)
++              return error;
++      error = listxattr(f->f_dentry, list, size);
++      fput(f);
++      return error;
++}
++
++/*
++ * Extended attribute REMOVE operations
++ */
++static long
++removexattr(struct dentry *d, char *name)
++{
++      int error;
++      char kname[XATTR_NAME_MAX + 1];
++
++      error = strncpy_from_user(kname, name, sizeof(kname));
++      if (error == 0 || error == sizeof(kname))
++              error = -ERANGE;
++      if (error < 0)
++              return error;
++
++      error = -EOPNOTSUPP;
++      if (d->d_inode->i_op && d->d_inode->i_op->removexattr) {
++              down(&d->d_inode->i_sem);
++              lock_kernel();
++              error = d->d_inode->i_op->removexattr(d, kname);
++              unlock_kernel();
++              up(&d->d_inode->i_sem);
++      }
++      return error;
++}
++
++asmlinkage long
++sys_removexattr(char *path, char *name)
++{
++      struct nameidata nd;
++      int error;
++
++      error = user_path_walk(path, &nd);
++      if (error)
++              return error;
++      error = removexattr(nd.dentry, name);
++      path_release(&nd);
++      return error;
++}
++
++asmlinkage long
++sys_lremovexattr(char *path, char *name)
++{
++      struct nameidata nd;
++      int error;
++
++      error = user_path_walk_link(path, &nd);
++      if (error)
++              return error;
++      error = removexattr(nd.dentry, name);
++      path_release(&nd);
++      return error;
++}
++
++asmlinkage long
++sys_fremovexattr(int fd, char *name)
++{
++      struct file *f;
++      int error = -EBADF;
++
++      f = fget(fd);
++      if (!f)
++              return error;
++      error = removexattr(f->f_dentry, name);
++      fput(f);
++      return error;
++}
+Index: linux-2.4.19-pre1/include/asm-arm/unistd.h
+===================================================================
+--- linux-2.4.19-pre1.orig/include/asm-arm/unistd.h    2001-08-12 22:14:00.000000000 +0400
++++ linux-2.4.19-pre1/include/asm-arm/unistd.h 2004-01-14 01:11:49.000000000 +0300
+@@ -240,6 +240,18 @@
+ #define __NR_mincore                  (__NR_SYSCALL_BASE+219)
+ #define __NR_madvise                  (__NR_SYSCALL_BASE+220)
+ #define __NR_fcntl64                  (__NR_SYSCALL_BASE+221)
++#define __NR_setxattr                 (__NR_SYSCALL_BASE+226)
++#define __NR_lsetxattr                        (__NR_SYSCALL_BASE+227)
++#define __NR_fsetxattr                        (__NR_SYSCALL_BASE+228)
++#define __NR_getxattr                 (__NR_SYSCALL_BASE+229)
++#define __NR_lgetxattr                        (__NR_SYSCALL_BASE+230)
++#define __NR_fgetxattr                        (__NR_SYSCALL_BASE+231)
++#define __NR_listxattr                        (__NR_SYSCALL_BASE+232)
++#define __NR_llistxattr                       (__NR_SYSCALL_BASE+233)
++#define __NR_flistxattr                       (__NR_SYSCALL_BASE+234)
++#define __NR_removexattr              (__NR_SYSCALL_BASE+235)
++#define __NR_lremovexattr             (__NR_SYSCALL_BASE+236)
++#define __NR_fremovexattr             (__NR_SYSCALL_BASE+237)
+ /*
+  * The following SWIs are ARM private.
+Index: linux-2.4.19-pre1/include/asm-ia64/unistd.h
+===================================================================
+--- linux-2.4.19-pre1.orig/include/asm-ia64/unistd.h   2001-11-10 01:26:17.000000000 +0300
++++ linux-2.4.19-pre1/include/asm-ia64/unistd.h        2004-01-14 01:11:49.000000000 +0300
+@@ -206,6 +206,18 @@
+ #define __NR_getdents64                       1214
+ #define __NR_getunwind                        1215
+ #define __NR_readahead                        1216
++#define __NR_setxattr                 1217
++#define __NR_lsetxattr                        1218
++#define __NR_fsetxattr                        1219
++#define __NR_getxattr                 1220
++#define __NR_lgetxattr                        1221
++#define __NR_fgetxattr                        1222
++#define __NR_listxattr                        1223
++#define __NR_llistxattr                       1224
++#define __NR_flistxattr                       1225
++#define __NR_removexattr              1226
++#define __NR_lremovexattr             1227
++#define __NR_fremovexattr             1228
+ #if !defined(__ASSEMBLY__) && !defined(ASSEMBLER)
+Index: linux-2.4.19-pre1/include/asm-s390/unistd.h
+===================================================================
+--- linux-2.4.19-pre1.orig/include/asm-s390/unistd.h   2001-10-11 20:43:38.000000000 +0400
++++ linux-2.4.19-pre1/include/asm-s390/unistd.h        2004-01-14 01:11:49.000000000 +0300
+@@ -211,6 +211,18 @@
+ #define __NR_mincore            218
+ #define __NR_madvise            219
+ #define __NR_getdents64               220
++#define __NR_setxattr         224
++#define __NR_lsetxattr                225
++#define __NR_fsetxattr                226
++#define __NR_getxattr         227
++#define __NR_lgetxattr                228
++#define __NR_fgetxattr                229
++#define __NR_listxattr                230
++#define __NR_llistxattr               231
++#define __NR_flistxattr               232
++#define __NR_removexattr      233
++#define __NR_lremovexattr     234
++#define __NR_fremovexattr     235
+ /* user-visible error numbers are in the range -1 - -122: see <asm-s390/errno.h> */
+Index: linux-2.4.19-pre1/include/asm-s390x/unistd.h
+===================================================================
+--- linux-2.4.19-pre1.orig/include/asm-s390x/unistd.h  2001-10-11 20:43:38.000000000 +0400
++++ linux-2.4.19-pre1/include/asm-s390x/unistd.h       2004-01-14 01:11:49.000000000 +0300
+@@ -181,6 +181,18 @@
+ #define __NR_mincore            218
+ #define __NR_madvise            219
+ #define __NR_getdents64         220
++#define __NR_setxattr         224
++#define __NR_lsetxattr                225
++#define __NR_fsetxattr                226
++#define __NR_getxattr         227
++#define __NR_lgetxattr                228
++#define __NR_fgetxattr                229
++#define __NR_listxattr                230
++#define __NR_llistxattr               231
++#define __NR_flistxattr               232
++#define __NR_removexattr      233
++#define __NR_lremovexattr     234
++#define __NR_fremovexattr     235
+ /* user-visible error numbers are in the range -1 - -122: see <asm-s390/errno.h> */
+Index: linux-2.4.19-pre1/include/asm-sparc/unistd.h
+===================================================================
+--- linux-2.4.19-pre1.orig/include/asm-sparc/unistd.h  2001-10-21 21:36:54.000000000 +0400
++++ linux-2.4.19-pre1/include/asm-sparc/unistd.h       2004-01-14 01:11:49.000000000 +0300
+@@ -184,24 +184,24 @@
+ /* #define __NR_exportfs        166    SunOS Specific                              */
+ #define __NR_mount              167 /* Common                                      */
+ #define __NR_ustat              168 /* Common                                      */
+-/* #define __NR_semsys          169    SunOS Specific                              */
+-/* #define __NR_msgsys          170    SunOS Specific                              */
+-/* #define __NR_shmsys          171    SunOS Specific                              */
+-/* #define __NR_auditsys        172    SunOS Specific                              */
+-/* #define __NR_rfssys          173    SunOS Specific                              */
++#define __NR_setxattr           169 /* SunOS: semsys                               */
++#define __NR_lsetxattr          170 /* SunOS: msgsys                               */
++#define __NR_fsetxattr          171 /* SunOS: shmsys                               */
++#define __NR_getxattr           172 /* SunOS: auditsys                             */
++#define __NR_lgetxattr          173 /* SunOS: rfssys                               */
+ #define __NR_getdents           174 /* Common                                      */
+ #define __NR_setsid             175 /* Common                                      */
+ #define __NR_fchdir             176 /* Common                                      */
+-/* #define __NR_fchroot         177    SunOS Specific                              */
+-/* #define __NR_vpixsys         178    SunOS Specific                              */
+-/* #define __NR_aioread         179    SunOS Specific                              */
+-/* #define __NR_aiowrite        180    SunOS Specific                              */
+-/* #define __NR_aiowait         181    SunOS Specific                              */
+-/* #define __NR_aiocancel       182    SunOS Specific                              */
++#define __NR_fgetxattr          177 /* SunOS: fchroot                              */
++#define __NR_listxattr          178 /* SunOS: vpixsys                              */
++#define __NR_llistxattr         179 /* SunOS: aioread                              */
++#define __NR_flistxattr         180 /* SunOS: aiowrite                             */
++#define __NR_removexattr        181 /* SunOS: aiowait                              */
++#define __NR_lremovexattr       182 /* SunOS: aiocancel                            */
+ #define __NR_sigpending         183 /* Common                                      */
+ #define __NR_query_module     184 /* Linux Specific                              */
+ #define __NR_setpgid            185 /* Common                                      */
+-/* #define __NR_pathconf        186    SunOS Specific                              */
++#define __NR_fremovexattr       186 /* SunOS: pathconf                             */
+ /* #define __NR_fpathconf       187    SunOS Specific                              */
+ /* #define __NR_sysconf         188    SunOS Specific                              */
+ #define __NR_uname              189 /* Linux Specific                              */
+Index: linux-2.4.19-pre1/include/asm-sparc64/unistd.h
+===================================================================
+--- linux-2.4.19-pre1.orig/include/asm-sparc64/unistd.h        2001-10-21 21:36:54.000000000 +0400
++++ linux-2.4.19-pre1/include/asm-sparc64/unistd.h     2004-01-14 01:11:49.000000000 +0300
+@@ -184,24 +184,24 @@
+ /* #define __NR_exportfs        166    SunOS Specific                              */
+ #define __NR_mount              167 /* Common                                      */
+ #define __NR_ustat              168 /* Common                                      */
+-/* #define __NR_semsys          169    SunOS Specific                              */
+-/* #define __NR_msgsys          170    SunOS Specific                              */
+-/* #define __NR_shmsys          171    SunOS Specific                              */
+-/* #define __NR_auditsys        172    SunOS Specific                              */
+-/* #define __NR_rfssys          173    SunOS Specific                              */
++#define __NR_setxattr           169 /* SunOS: semsys                               */
++#define __NR_lsetxattr          170 /* SunOS: msgsys                               */
++#define __NR_fsetxattr          171 /* SunOS: shmsys                               */
++#define __NR_getxattr           172 /* SunOS: auditsys                             */
++#define __NR_lgetxattr          173 /* SunOS: rfssys                               */
+ #define __NR_getdents           174 /* Common                                      */
+ #define __NR_setsid             175 /* Common                                      */
+ #define __NR_fchdir             176 /* Common                                      */
+-/* #define __NR_fchroot         177    SunOS Specific                              */
+-/* #define __NR_vpixsys         178    SunOS Specific                              */
+-/* #define __NR_aioread         179    SunOS Specific                              */
+-/* #define __NR_aiowrite        180    SunOS Specific                              */
+-/* #define __NR_aiowait         181    SunOS Specific                              */
+-/* #define __NR_aiocancel       182    SunOS Specific                              */
++#define __NR_fgetxattr          177 /* SunOS: fchroot                              */
++#define __NR_listxattr          178 /* SunOS: vpixsys                              */
++#define __NR_llistxattr         179 /* SunOS: aioread                              */
++#define __NR_flistxattr         180 /* SunOS: aiowrite                             */
++#define __NR_removexattr        181 /* SunOS: aiowait                              */
++#define __NR_lremovexattr       182 /* SunOS: aiocancel                            */
+ #define __NR_sigpending         183 /* Common                                      */
+ #define __NR_query_module     184 /* Linux Specific                              */
+ #define __NR_setpgid            185 /* Common                                      */
+-/* #define __NR_pathconf        186    SunOS Specific                              */
++#define __NR_fremovexattr       186 /* SunOS: pathconf                             */
+ /* #define __NR_fpathconf       187    SunOS Specific                              */
+ /* #define __NR_sysconf         188    SunOS Specific                              */
+ #define __NR_uname              189 /* Linux Specific                              */
+Index: linux-2.4.19-pre1/include/linux/cache_def.h
+===================================================================
+--- linux-2.4.19-pre1.orig/include/linux/cache_def.h   2003-01-30 13:24:37.000000000 +0300
++++ linux-2.4.19-pre1/include/linux/cache_def.h        2004-01-14 01:11:49.000000000 +0300
+@@ -0,0 +1,15 @@
++/*
++ * linux/cache_def.h
++ * Handling of caches defined in drivers, filesystems, ...
++ *
++ * Copyright (C) 2002 by Andreas Gruenbacher, <a.gruenbacher@computer.org>
++ */
 +
-+struct ext2_xattr_handler {
-+      char *prefix;
-+      size_t (*list)(char *list, struct inode *inode, const char *name,
-+                     int name_len);
-+      int (*get)(struct inode *inode, const char *name, void *buffer,
-+                 size_t size);
-+      int (*set)(struct inode *inode, const char *name, const void *buffer,
-+                 size_t size, int flags);
++struct cache_definition {
++      const char *name;
++      void (*shrink)(int, unsigned int);
++      struct list_head link;
 +};
 +
-+extern int ext2_xattr_register(int, struct ext2_xattr_handler *);
-+extern void ext2_xattr_unregister(int, struct ext2_xattr_handler *);
-+
-+extern int ext2_setxattr(struct dentry *, const char *, const void *, size_t, int);
-+extern ssize_t ext2_getxattr(struct dentry *, const char *, void *, size_t);
-+extern ssize_t ext2_listxattr(struct dentry *, char *, size_t);
-+extern int ext2_removexattr(struct dentry *, const char *);
-+
-+extern int ext2_xattr_get(struct inode *, int, const char *, void *, size_t);
-+extern int ext2_xattr_list(struct inode *, char *, size_t);
-+extern int ext2_xattr_set(struct inode *, int, const char *, const void *, size_t, int);
-+
-+extern void ext2_xattr_delete_inode(struct inode *);
-+extern void ext2_xattr_put_super(struct super_block *);
-+
-+extern int init_ext2_xattr(void) __init;
-+extern void exit_ext2_xattr(void);
-+
-+# else  /* CONFIG_EXT2_FS_XATTR */
-+#  define ext2_setxattr               NULL
-+#  define ext2_getxattr               NULL
-+#  define ext2_listxattr      NULL
-+#  define ext2_removexattr    NULL
-+
-+static inline int
-+ext2_xattr_get(struct inode *inode, int name_index,
-+             const char *name, void *buffer, size_t size)
-+{
-+      return -ENOTSUP;
-+}
-+
-+static inline int
-+ext2_xattr_list(struct inode *inode, char *buffer, size_t size)
-+{
-+      return -ENOTSUP;
-+}
-+
-+static inline int
-+ext2_xattr_set(struct inode *inode, int name_index, const char *name,
-+             const void *value, size_t size, int flags)
-+{
-+      return -ENOTSUP;
-+}
-+
-+static inline void
-+ext2_xattr_delete_inode(struct inode *inode)
-+{
-+}
-+
-+static inline void
-+ext2_xattr_put_super(struct super_block *sb)
-+{
-+}
-+
-+static inline int
-+init_ext2_xattr(void)
-+{
-+      return 0;
-+}
-+
-+static inline void
-+exit_ext2_xattr(void)
-+{
-+}
-+
-+# endif  /* CONFIG_EXT2_FS_XATTR */
-+
-+# ifdef CONFIG_EXT2_FS_XATTR_USER
-+
-+extern int init_ext2_xattr_user(void) __init;
-+extern void exit_ext2_xattr_user(void);
-+
-+# else  /* CONFIG_EXT2_FS_XATTR_USER */
-+
-+static inline int
-+init_ext2_xattr_user(void)
-+{
-+      return 0;
-+}
-+
-+static inline void
-+exit_ext2_xattr_user(void)
-+{
-+}
-+
-+# endif  /* CONFIG_EXT2_FS_XATTR_USER */
-+
-+#endif  /* __KERNEL__ */
++extern void register_cache(struct cache_definition *);
++extern void unregister_cache(struct cache_definition *);
+Index: linux-2.4.19-pre1/include/linux/errno.h
+===================================================================
+--- linux-2.4.19-pre1.orig/include/linux/errno.h       2001-02-10 01:46:13.000000000 +0300
++++ linux-2.4.19-pre1/include/linux/errno.h    2004-01-14 01:11:49.000000000 +0300
+@@ -23,4 +23,8 @@
+ #endif
++/* Defined for extended attributes */
++#define ENOATTR ENODATA               /* No such attribute */
++#define ENOTSUP EOPNOTSUPP    /* Operation not supported */
 +
-Index: linux-2.4.19-pre1/include/linux/ext3_fs.h
+ #endif
+Index: linux-2.4.19-pre1/include/linux/ext2_fs.h
 ===================================================================
---- linux-2.4.19-pre1.orig/include/linux/ext3_fs.h     2003-11-21 03:51:02.000000000 +0300
-+++ linux-2.4.19-pre1/include/linux/ext3_fs.h  2003-11-21 03:51:05.000000000 +0300
-@@ -63,8 +63,6 @@
+--- linux-2.4.19-pre1.orig/include/linux/ext2_fs.h     2001-11-22 22:46:52.000000000 +0300
++++ linux-2.4.19-pre1/include/linux/ext2_fs.h  2004-01-14 01:18:00.000000000 +0300
+@@ -57,8 +57,6 @@
   */
- #define       EXT3_BAD_INO             1      /* Bad blocks inode */
- #define EXT3_ROOT_INO          2      /* Root inode */
--#define EXT3_ACL_IDX_INO       3      /* ACL inode */
--#define EXT3_ACL_DATA_INO      4      /* ACL inode */
- #define EXT3_BOOT_LOADER_INO   5      /* Boot loader inode */
- #define EXT3_UNDEL_DIR_INO     6      /* Undelete directory inode */
- #define EXT3_RESIZE_INO                7      /* Reserved group descriptors inode */
-@@ -94,7 +92,6 @@
+ #define       EXT2_BAD_INO             1      /* Bad blocks inode */
+ #define EXT2_ROOT_INO          2      /* Root inode */
+-#define EXT2_ACL_IDX_INO       3      /* ACL inode */
+-#define EXT2_ACL_DATA_INO      4      /* ACL inode */
+ #define EXT2_BOOT_LOADER_INO   5      /* Boot loader inode */
+ #define EXT2_UNDEL_DIR_INO     6      /* Undelete directory inode */
+@@ -86,7 +84,6 @@
  #else
- # define EXT3_BLOCK_SIZE(s)           (EXT3_MIN_BLOCK_SIZE << (s)->s_log_block_size)
+ # define EXT2_BLOCK_SIZE(s)           (EXT2_MIN_BLOCK_SIZE << (s)->s_log_block_size)
  #endif
--#define EXT3_ACLE_PER_BLOCK(s)                (EXT3_BLOCK_SIZE(s) / sizeof (struct ext3_acl_entry))
- #define       EXT3_ADDR_PER_BLOCK(s)          (EXT3_BLOCK_SIZE(s) / sizeof (__u32))
+-#define EXT2_ACLE_PER_BLOCK(s)                (EXT2_BLOCK_SIZE(s) / sizeof (struct ext2_acl_entry))
+ #define       EXT2_ADDR_PER_BLOCK(s)          (EXT2_BLOCK_SIZE(s) / sizeof (__u32))
  #ifdef __KERNEL__
- # define EXT3_BLOCK_SIZE_BITS(s)      ((s)->s_blocksize_bits)
-@@ -129,28 +126,6 @@
+ # define EXT2_BLOCK_SIZE_BITS(s)      ((s)->s_blocksize_bits)
+@@ -121,28 +118,6 @@
  #endif
  
  /*
 - * ACL structures
 - */
--struct ext3_acl_header        /* Header of Access Control Lists */
+-struct ext2_acl_header        /* Header of Access Control Lists */
 -{
 -      __u32   aclh_size;
 -      __u32   aclh_file_count;
@@ -5175,7 +5340,7 @@ Index: linux-2.4.19-pre1/include/linux/ext3_fs.h
 -      __u32   aclh_first_acle;
 -};
 -
--struct ext3_acl_entry /* Access Control List Entry */
+-struct ext2_acl_entry /* Access Control List Entry */
 -{
 -      __u32   acle_size;
 -      __u16   acle_perms;     /* Access permissions */
@@ -5189,77 +5354,52 @@ Index: linux-2.4.19-pre1/include/linux/ext3_fs.h
 -/*
   * Structure of a blocks group descriptor
   */
- struct ext3_group_desc
-@@ -344,6 +319,7 @@
-   #define EXT3_MOUNT_WRITEBACK_DATA   0x0C00  /* No data ordering */
- #define EXT3_MOUNT_UPDATE_JOURNAL     0x1000  /* Update the journal format */
- #define EXT3_MOUNT_NO_UID32           0x2000  /* Disable 32-bit UIDs */
-+#define EXT3_MOUNT_XATTR_USER         0x4000  /* Extended user attributes */
- /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
- #ifndef _LINUX_EXT2_FS_H
-@@ -520,7 +496,7 @@
- #define EXT3_FEATURE_INCOMPAT_RECOVER         0x0004 /* Needs recovery */
- #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV     0x0008 /* Journal device */
+ struct ext2_group_desc
+@@ -314,6 +289,7 @@
+ #define EXT2_MOUNT_ERRORS_PANIC               0x0040  /* Panic on errors */
+ #define EXT2_MOUNT_MINIX_DF           0x0080  /* Mimics the Minix statfs */
+ #define EXT2_MOUNT_NO_UID32           0x0200  /* Disable 32-bit UIDs */
++#define EXT2_MOUNT_XATTR_USER         0x4000  /* Extended user attributes */
  
--#define EXT3_FEATURE_COMPAT_SUPP      0
-+#define EXT3_FEATURE_COMPAT_SUPP      EXT2_FEATURE_COMPAT_EXT_ATTR
- #define EXT3_FEATURE_INCOMPAT_SUPP    (EXT3_FEATURE_INCOMPAT_FILETYPE| \
-                                        EXT3_FEATURE_INCOMPAT_RECOVER)
- #define EXT3_FEATURE_RO_COMPAT_SUPP   (EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \
-@@ -703,6 +679,7 @@
- extern unsigned long ext3_count_free (struct buffer_head *, unsigned);
+ #define clear_opt(o, opt)             o &= ~EXT2_MOUNT_##opt
+ #define set_opt(o, opt)                       o |= EXT2_MOUNT_##opt
+@@ -397,6 +373,7 @@
  
- /* inode.c */
-+extern int ext3_forget(handle_t *, int, struct inode *, struct buffer_head *, int);
- extern struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *);
- extern struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *);
+ #ifdef __KERNEL__
+ #define EXT2_SB(sb)   (&((sb)->u.ext2_sb))
++#define EXT2_I(inode) (&((inode)->u.ext2_i))
+ #else
+ /* Assume that user mode programs are passing in an ext2fs superblock, not
+  * a kernel struct super_block.  This will allow us to call the feature-test
+@@ -466,7 +443,7 @@
+ #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV     0x0008
+ #define EXT2_FEATURE_INCOMPAT_ANY             0xffffffff
  
-@@ -771,8 +748,10 @@
+-#define EXT2_FEATURE_COMPAT_SUPP      0
++#define EXT2_FEATURE_COMPAT_SUPP      EXT2_FEATURE_COMPAT_EXT_ATTR
+ #define EXT2_FEATURE_INCOMPAT_SUPP    EXT2_FEATURE_INCOMPAT_FILETYPE
+ #define EXT2_FEATURE_RO_COMPAT_SUPP   (EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| \
+                                        EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \
+@@ -623,8 +600,10 @@
  
  /* namei.c */
- extern struct inode_operations ext3_dir_inode_operations;
-+extern struct inode_operations ext3_special_inode_operations;
+ extern struct inode_operations ext2_dir_inode_operations;
++extern struct inode_operations ext2_special_inode_operations;
  
  /* symlink.c */
-+extern struct inode_operations ext3_symlink_inode_operations;
- extern struct inode_operations ext3_fast_symlink_inode_operations;
-Index: linux-2.4.19-pre1/include/linux/ext3_jbd.h
-===================================================================
---- linux-2.4.19-pre1.orig/include/linux/ext3_jbd.h    2003-11-21 03:51:02.000000000 +0300
-+++ linux-2.4.19-pre1/include/linux/ext3_jbd.h 2003-11-21 03:51:05.000000000 +0300
-@@ -30,13 +30,19 @@
- #define EXT3_SINGLEDATA_TRANS_BLOCKS  8
-+/* Extended attributes may touch two data buffers, two bitmap buffers,
-+ * and two group and summaries. */
-+
-+#define EXT3_XATTR_TRANS_BLOCKS               8
-+
- /* Define the minimum size for a transaction which modifies data.  This
-  * needs to take into account the fact that we may end up modifying two
-  * quota files too (one for the group, one for the user quota).  The
-  * superblock only gets updated once, of course, so don't bother
-  * counting that again for the quota updates. */
--#define EXT3_DATA_TRANS_BLOCKS                (3 * EXT3_SINGLEDATA_TRANS_BLOCKS - 2)
-+#define EXT3_DATA_TRANS_BLOCKS                (3 * EXT3_SINGLEDATA_TRANS_BLOCKS + \
-+                                       EXT3_XATTR_TRANS_BLOCKS - 2)
- extern int ext3_writepage_trans_blocks(struct inode *inode);
++extern struct inode_operations ext2_symlink_inode_operations;
+ extern struct inode_operations ext2_fast_symlink_inode_operations;
  
-Index: linux-2.4.19-pre1/include/linux/ext3_xattr.h
+ #endif        /* __KERNEL__ */
+Index: linux-2.4.19-pre1/include/linux/ext2_xattr.h
 ===================================================================
---- linux-2.4.19-pre1.orig/include/linux/ext3_xattr.h  2003-11-21 03:51:05.000000000 +0300
-+++ linux-2.4.19-pre1/include/linux/ext3_xattr.h       2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/include/linux/ext2_xattr.h  2003-01-30 13:24:37.000000000 +0300
++++ linux-2.4.19-pre1/include/linux/ext2_xattr.h       2004-01-14 01:18:01.000000000 +0300
 @@ -0,0 +1,157 @@
 +/*
-+  File: linux/ext3_xattr.h
++  File: linux/ext2_xattr.h
 +
-+  On-disk format of extended attributes for the ext3 filesystem.
++  On-disk format of extended attributes for the ext2 filesystem.
 +
 +  (C) 2001 Andreas Gruenbacher, <a.gruenbacher@computer.org>
 +*/
@@ -5269,18 +5409,18 @@ Index: linux-2.4.19-pre1/include/linux/ext3_xattr.h
 +#include <linux/xattr.h>
 +
 +/* Magic value in attribute blocks */
-+#define EXT3_XATTR_MAGIC              0xEA020000
++#define EXT2_XATTR_MAGIC              0xEA020000
 +
 +/* Maximum number of references to one attribute block */
-+#define EXT3_XATTR_REFCOUNT_MAX               1024
++#define EXT2_XATTR_REFCOUNT_MAX               1024
 +
 +/* Name indexes */
-+#define EXT3_XATTR_INDEX_MAX                  10
-+#define EXT3_XATTR_INDEX_USER                 1
-+#define EXT3_XATTR_INDEX_POSIX_ACL_ACCESS     2
-+#define EXT3_XATTR_INDEX_POSIX_ACL_DEFAULT    3
++#define EXT2_XATTR_INDEX_MAX                  10
++#define EXT2_XATTR_INDEX_USER                 1
++#define EXT2_XATTR_INDEX_POSIX_ACL_ACCESS     2
++#define EXT2_XATTR_INDEX_POSIX_ACL_DEFAULT    3
 +
-+struct ext3_xattr_header {
++struct ext2_xattr_header {
 +      __u32   h_magic;        /* magic number for identification */
 +      __u32   h_refcount;     /* reference count */
 +      __u32   h_blocks;       /* number of disk blocks used */
@@ -5288,7 +5428,7 @@ Index: linux-2.4.19-pre1/include/linux/ext3_xattr.h
 +      __u32   h_reserved[4];  /* zero right now */
 +};
 +
-+struct ext3_xattr_entry {
++struct ext2_xattr_entry {
 +      __u8    e_name_len;     /* length of name */
 +      __u8    e_name_index;   /* attribute name index */
 +      __u16   e_value_offs;   /* offset in disk block of value */
@@ -5298,23 +5438,23 @@ Index: linux-2.4.19-pre1/include/linux/ext3_xattr.h
 +      char    e_name[0];      /* attribute name */
 +};
 +
-+#define EXT3_XATTR_PAD_BITS           2
-+#define EXT3_XATTR_PAD                (1<<EXT3_XATTR_PAD_BITS)
-+#define EXT3_XATTR_ROUND              (EXT3_XATTR_PAD-1)
-+#define EXT3_XATTR_LEN(name_len) \
-+      (((name_len) + EXT3_XATTR_ROUND + \
-+      sizeof(struct ext3_xattr_entry)) & ~EXT3_XATTR_ROUND)
-+#define EXT3_XATTR_NEXT(entry) \
-+      ( (struct ext3_xattr_entry *)( \
-+        (char *)(entry) + EXT3_XATTR_LEN((entry)->e_name_len)) )
-+#define EXT3_XATTR_SIZE(size) \
-+      (((size) + EXT3_XATTR_ROUND) & ~EXT3_XATTR_ROUND)
++#define EXT2_XATTR_PAD_BITS           2
++#define EXT2_XATTR_PAD                (1<<EXT2_XATTR_PAD_BITS)
++#define EXT2_XATTR_ROUND              (EXT2_XATTR_PAD-1)
++#define EXT2_XATTR_LEN(name_len) \
++      (((name_len) + EXT2_XATTR_ROUND + \
++      sizeof(struct ext2_xattr_entry)) & ~EXT2_XATTR_ROUND)
++#define EXT2_XATTR_NEXT(entry) \
++      ( (struct ext2_xattr_entry *)( \
++        (char *)(entry) + EXT2_XATTR_LEN((entry)->e_name_len)) )
++#define EXT2_XATTR_SIZE(size) \
++      (((size) + EXT2_XATTR_ROUND) & ~EXT2_XATTR_ROUND)
 +
 +#ifdef __KERNEL__
 +
-+# ifdef CONFIG_EXT3_FS_XATTR
++# ifdef CONFIG_EXT2_FS_XATTR
 +
-+struct ext3_xattr_handler {
++struct ext2_xattr_handler {
 +      char *prefix;
 +      size_t (*list)(char *list, struct inode *inode, const char *name,
 +                     int name_len);
@@ -5324,710 +5464,481 @@ Index: linux-2.4.19-pre1/include/linux/ext3_xattr.h
 +                 size_t size, int flags);
 +};
 +
-+extern int ext3_xattr_register(int, struct ext3_xattr_handler *);
-+extern void ext3_xattr_unregister(int, struct ext3_xattr_handler *);
++extern int ext2_xattr_register(int, struct ext2_xattr_handler *);
++extern void ext2_xattr_unregister(int, struct ext2_xattr_handler *);
 +
-+extern int ext3_setxattr(struct dentry *, const char *, const void *, size_t, int);
-+extern ssize_t ext3_getxattr(struct dentry *, const char *, void *, size_t);
-+extern ssize_t ext3_listxattr(struct dentry *, char *, size_t);
-+extern int ext3_removexattr(struct dentry *, const char *);
++extern int ext2_setxattr(struct dentry *, const char *, const void *, size_t, int);
++extern ssize_t ext2_getxattr(struct dentry *, const char *, void *, size_t);
++extern ssize_t ext2_listxattr(struct dentry *, char *, size_t);
++extern int ext2_removexattr(struct dentry *, const char *);
 +
-+extern int ext3_xattr_get(struct inode *, int, const char *, void *, size_t);
-+extern int ext3_xattr_list(struct inode *, char *, size_t);
-+extern int ext3_xattr_set(handle_t *handle, struct inode *, int, const char *, const void *, size_t, int);
++extern int ext2_xattr_get(struct inode *, int, const char *, void *, size_t);
++extern int ext2_xattr_list(struct inode *, char *, size_t);
++extern int ext2_xattr_set(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 *);
++extern void ext2_xattr_delete_inode(struct inode *);
++extern void ext2_xattr_put_super(struct super_block *);
 +
-+extern int init_ext3_xattr(void) __init;
-+extern void exit_ext3_xattr(void);
++extern int init_ext2_xattr(void) __init;
++extern void exit_ext2_xattr(void);
 +
-+# else  /* CONFIG_EXT3_FS_XATTR */
-+#  define ext3_setxattr               NULL
-+#  define ext3_getxattr               NULL
-+#  define ext3_listxattr      NULL
-+#  define ext3_removexattr    NULL
++# else  /* CONFIG_EXT2_FS_XATTR */
++#  define ext2_setxattr               NULL
++#  define ext2_getxattr               NULL
++#  define ext2_listxattr      NULL
++#  define ext2_removexattr    NULL
 +
 +static inline int
-+ext3_xattr_get(struct inode *inode, int name_index, const char *name,
-+             void *buffer, size_t size)
++ext2_xattr_get(struct inode *inode, int name_index,
++             const char *name, void *buffer, size_t size)
 +{
 +      return -ENOTSUP;
 +}
 +
 +static inline int
-+ext3_xattr_list(struct inode *inode, void *buffer, size_t size)
++ext2_xattr_list(struct inode *inode, char *buffer, size_t size)
 +{
 +      return -ENOTSUP;
 +}
 +
 +static inline int
-+ext3_xattr_set(handle_t *handle, struct inode *inode, int name_index,
-+             const char *name, const void *value, size_t size, int flags)
++ext2_xattr_set(struct inode *inode, int name_index, const char *name,
++             const void *value, size_t size, int flags)
 +{
 +      return -ENOTSUP;
 +}
 +
 +static inline void
-+ext3_xattr_delete_inode(handle_t *handle, struct inode *inode)
++ext2_xattr_delete_inode(struct inode *inode)
 +{
 +}
 +
 +static inline void
-+ext3_xattr_put_super(struct super_block *sb)
++ext2_xattr_put_super(struct super_block *sb)
 +{
 +}
 +
 +static inline int
-+init_ext3_xattr(void)
++init_ext2_xattr(void)
 +{
 +      return 0;
 +}
 +
 +static inline void
-+exit_ext3_xattr(void)
++exit_ext2_xattr(void)
 +{
 +}
 +
-+# endif  /* CONFIG_EXT3_FS_XATTR */
++# endif  /* CONFIG_EXT2_FS_XATTR */
 +
-+# ifdef CONFIG_EXT3_FS_XATTR_USER
++# ifdef CONFIG_EXT2_FS_XATTR_USER
 +
-+extern int init_ext3_xattr_user(void) __init;
-+extern void exit_ext3_xattr_user(void);
++extern int init_ext2_xattr_user(void) __init;
++extern void exit_ext2_xattr_user(void);
 +
-+# else  /* CONFIG_EXT3_FS_XATTR_USER */
++# else  /* CONFIG_EXT2_FS_XATTR_USER */
 +
 +static inline int
-+init_ext3_xattr_user(void)
++init_ext2_xattr_user(void)
 +{
 +      return 0;
 +}
 +
 +static inline void
-+exit_ext3_xattr_user(void)
++exit_ext2_xattr_user(void)
 +{
 +}
 +
-+#endif  /* CONFIG_EXT3_FS_XATTR_USER */
++# endif  /* CONFIG_EXT2_FS_XATTR_USER */
 +
 +#endif  /* __KERNEL__ */
 +
-Index: linux-2.4.19-pre1/include/linux/fs.h
+Index: linux-2.4.19-pre1/include/linux/ext3_fs.h
 ===================================================================
---- linux-2.4.19-pre1.orig/include/linux/fs.h  2003-11-21 03:51:00.000000000 +0300
-+++ linux-2.4.19-pre1/include/linux/fs.h       2003-11-21 03:51:05.000000000 +0300
-@@ -872,6 +872,10 @@
-       int (*setattr) (struct dentry *, struct iattr *);
-       int (*setattr_raw) (struct inode *, struct iattr *);
-       int (*getattr) (struct dentry *, struct iattr *);
-+      int (*setxattr) (struct dentry *, const char *, const void *, size_t, int);
-+      ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
-+      ssize_t (*listxattr) (struct dentry *, char *, size_t);
-+      int (*removexattr) (struct dentry *, const char *);
- };
+--- linux-2.4.19-pre1.orig/include/linux/ext3_fs.h     2004-01-14 01:11:49.000000000 +0300
++++ linux-2.4.19-pre1/include/linux/ext3_fs.h  2004-01-14 01:11:49.000000000 +0300
+@@ -63,8 +63,6 @@
+  */
+ #define       EXT3_BAD_INO             1      /* Bad blocks inode */
+ #define EXT3_ROOT_INO          2      /* Root inode */
+-#define EXT3_ACL_IDX_INO       3      /* ACL inode */
+-#define EXT3_ACL_DATA_INO      4      /* ACL inode */
+ #define EXT3_BOOT_LOADER_INO   5      /* Boot loader inode */
+ #define EXT3_UNDEL_DIR_INO     6      /* Undelete directory inode */
+ #define EXT3_RESIZE_INO                7      /* Reserved group descriptors inode */
+@@ -94,7 +92,6 @@
+ #else
+ # define EXT3_BLOCK_SIZE(s)           (EXT3_MIN_BLOCK_SIZE << (s)->s_log_block_size)
+ #endif
+-#define EXT3_ACLE_PER_BLOCK(s)                (EXT3_BLOCK_SIZE(s) / sizeof (struct ext3_acl_entry))
+ #define       EXT3_ADDR_PER_BLOCK(s)          (EXT3_BLOCK_SIZE(s) / sizeof (__u32))
+ #ifdef __KERNEL__
+ # define EXT3_BLOCK_SIZE_BITS(s)      ((s)->s_blocksize_bits)
+@@ -129,28 +126,6 @@
+ #endif
  
- struct seq_file;
-Index: linux-2.4.19-pre1/include/linux/mbcache.h
-===================================================================
---- linux-2.4.19-pre1.orig/include/linux/mbcache.h     2003-11-21 03:51:05.000000000 +0300
-+++ linux-2.4.19-pre1/include/linux/mbcache.h  2003-11-21 03:51:05.000000000 +0300
-@@ -0,0 +1,69 @@
-+/*
-+  File: linux/mbcache.h
-+
-+  (C) 2001 by Andreas Gruenbacher, <a.gruenbacher@computer.org>
-+*/
-+
-+/* Hardwire the number of additional indexes */
-+#define MB_CACHE_INDEXES_COUNT 1
-+
-+struct mb_cache_entry;
-+
-+struct mb_cache_op {
-+      int (*free)(struct mb_cache_entry *, int);
-+};
-+
-+struct mb_cache {
-+      struct list_head                c_cache_list;
-+      const char                      *c_name;
-+      struct mb_cache_op              c_op;
-+      atomic_t                        c_entry_count;
-+      int                             c_bucket_count;
-+#ifndef MB_CACHE_INDEXES_COUNT
-+      int                             c_indexes_count;
-+#endif
-+      kmem_cache_t                    *c_entry_cache;
-+      struct list_head                *c_block_hash;
-+      struct list_head                *c_indexes_hash[0];
-+};
-+
-+struct mb_cache_entry_index {
-+      struct list_head                o_list;
-+      unsigned int                    o_key;
-+};
-+
-+struct mb_cache_entry {
-+      struct list_head                e_lru_list;
-+      struct mb_cache                 *e_cache;
-+      atomic_t                        e_used;
-+      kdev_t                          e_dev;
-+      unsigned long                   e_block;
-+      struct list_head                e_block_list;
-+      struct mb_cache_entry_index     e_indexes[0];
-+};
-+
-+/* Functions on caches */
-+
-+struct mb_cache * mb_cache_create(const char *, struct mb_cache_op *, size_t,
-+                                int, int);
-+void mb_cache_shrink(struct mb_cache *, kdev_t);
-+void mb_cache_destroy(struct mb_cache *);
-+
-+/* Functions on cache entries */
-+
-+struct mb_cache_entry *mb_cache_entry_alloc(struct mb_cache *);
-+int mb_cache_entry_insert(struct mb_cache_entry *, kdev_t, unsigned long,
-+                        unsigned int[]);
-+void mb_cache_entry_rehash(struct mb_cache_entry *, unsigned int[]);
-+void mb_cache_entry_release(struct mb_cache_entry *);
-+void mb_cache_entry_takeout(struct mb_cache_entry *);
-+void mb_cache_entry_free(struct mb_cache_entry *);
-+struct mb_cache_entry *mb_cache_entry_dup(struct mb_cache_entry *);
-+struct mb_cache_entry *mb_cache_entry_get(struct mb_cache *, kdev_t,
-+                                        unsigned long);
-+#if !defined(MB_CACHE_INDEXES_COUNT) || (MB_CACHE_INDEXES_COUNT > 0)
-+struct mb_cache_entry *mb_cache_entry_find_first(struct mb_cache *cache, int,
-+                                               kdev_t, unsigned int);
-+struct mb_cache_entry *mb_cache_entry_find_next(struct mb_cache_entry *, int,
-+                                              kdev_t, unsigned int);
-+#endif
-Index: linux-2.4.19-pre1/kernel/ksyms.c
-===================================================================
---- linux-2.4.19-pre1.orig/kernel/ksyms.c      2003-11-21 03:50:59.000000000 +0300
-+++ linux-2.4.19-pre1/kernel/ksyms.c   2003-11-21 03:51:05.000000000 +0300
-@@ -11,6 +11,7 @@
+ /*
+- * ACL structures
+- */
+-struct ext3_acl_header        /* Header of Access Control Lists */
+-{
+-      __u32   aclh_size;
+-      __u32   aclh_file_count;
+-      __u32   aclh_acle_count;
+-      __u32   aclh_first_acle;
+-};
+-
+-struct ext3_acl_entry /* Access Control List Entry */
+-{
+-      __u32   acle_size;
+-      __u16   acle_perms;     /* Access permissions */
+-      __u16   acle_type;      /* Type of entry */
+-      __u16   acle_tag;       /* User or group identity */
+-      __u16   acle_pad1;
+-      __u32   acle_next;      /* Pointer on next entry for the */
+-                                      /* same inode or on next free entry */
+-};
+-
+-/*
+  * Structure of a blocks group descriptor
+  */
+ struct ext3_group_desc
+@@ -344,6 +319,7 @@
+   #define EXT3_MOUNT_WRITEBACK_DATA   0x0C00  /* No data ordering */
+ #define EXT3_MOUNT_UPDATE_JOURNAL     0x1000  /* Update the journal format */
+ #define EXT3_MOUNT_NO_UID32           0x2000  /* Disable 32-bit UIDs */
++#define EXT3_MOUNT_XATTR_USER         0x4000  /* Extended user attributes */
+ /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
+ #ifndef _LINUX_EXT2_FS_H
+@@ -520,7 +496,7 @@
+ #define EXT3_FEATURE_INCOMPAT_RECOVER         0x0004 /* Needs recovery */
+ #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV     0x0008 /* Journal device */
  
- #include <linux/config.h>
- #include <linux/slab.h>
-+#include <linux/cache_def.h>
- #include <linux/module.h>
- #include <linux/blkdev.h>
- #include <linux/cdrom.h>
-@@ -88,6 +89,7 @@
- EXPORT_SYMBOL(exit_files);
- EXPORT_SYMBOL(exit_fs);
- EXPORT_SYMBOL(exit_sighand);
-+EXPORT_SYMBOL(copy_fs_struct);
+-#define EXT3_FEATURE_COMPAT_SUPP      0
++#define EXT3_FEATURE_COMPAT_SUPP      EXT2_FEATURE_COMPAT_EXT_ATTR
+ #define EXT3_FEATURE_INCOMPAT_SUPP    (EXT3_FEATURE_INCOMPAT_FILETYPE| \
+                                        EXT3_FEATURE_INCOMPAT_RECOVER)
+ #define EXT3_FEATURE_RO_COMPAT_SUPP   (EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \
+@@ -703,6 +679,7 @@
+ extern unsigned long ext3_count_free (struct buffer_head *, unsigned);
  
- /* internal kernel memory management */
- EXPORT_SYMBOL(_alloc_pages);
-@@ -104,6 +106,8 @@
- EXPORT_SYMBOL(kmem_cache_shrink);
- EXPORT_SYMBOL(kmem_cache_alloc);
- EXPORT_SYMBOL(kmem_cache_free);
-+EXPORT_SYMBOL(register_cache);
-+EXPORT_SYMBOL(unregister_cache);
- EXPORT_SYMBOL(kmalloc);
- EXPORT_SYMBOL(kfree);
- EXPORT_SYMBOL(vfree);
-Index: linux-2.4.19-pre1/mm/vmscan.c
+ /* inode.c */
++extern int ext3_forget(handle_t *, int, struct inode *, struct buffer_head *, int);
+ extern struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *);
+ extern struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *);
+@@ -771,8 +748,10 @@
+ /* namei.c */
+ extern struct inode_operations ext3_dir_inode_operations;
++extern struct inode_operations ext3_special_inode_operations;
+ /* symlink.c */
++extern struct inode_operations ext3_symlink_inode_operations;
+ extern struct inode_operations ext3_fast_symlink_inode_operations;
+Index: linux-2.4.19-pre1/include/linux/ext3_jbd.h
 ===================================================================
---- linux-2.4.19-pre1.orig/mm/vmscan.c 2003-11-20 19:01:38.000000000 +0300
-+++ linux-2.4.19-pre1/mm/vmscan.c      2003-11-21 03:51:05.000000000 +0300
-@@ -15,6 +15,7 @@
- #include <linux/kernel_stat.h>
- #include <linux/swap.h>
- #include <linux/swapctl.h>
-+#include <linux/cache_def.h>
- #include <linux/smp_lock.h>
- #include <linux/pagemap.h>
- #include <linux/init.h>
-@@ -32,6 +33,39 @@
-  */
- #define DEF_PRIORITY (6)
+--- linux-2.4.19-pre1.orig/include/linux/ext3_jbd.h    2004-01-14 01:11:49.000000000 +0300
++++ linux-2.4.19-pre1/include/linux/ext3_jbd.h 2004-01-14 01:18:04.000000000 +0300
+@@ -30,13 +30,19 @@
  
-+static DECLARE_MUTEX(other_caches_sem);
-+static LIST_HEAD(cache_definitions);
-+
-+void register_cache(struct cache_definition *cache)
-+{
-+      down(&other_caches_sem);
-+      list_add(&cache->link, &cache_definitions);
-+      up(&other_caches_sem);
-+}
-+
-+void unregister_cache(struct cache_definition *cache)
-+{
-+      down(&other_caches_sem);
-+      list_del(&cache->link);
-+      up(&other_caches_sem);
-+}
-+
-+static void shrink_other_caches(unsigned int priority, int gfp_mask)
-+{
-+      struct list_head *p;
-+
-+      if (down_trylock(&other_caches_sem))
-+              return;
-+
-+      list_for_each_prev(p, &cache_definitions) {
-+              struct cache_definition *cache =
-+                      list_entry(p, struct cache_definition, link);
+ #define EXT3_SINGLEDATA_TRANS_BLOCKS  8
++/* Extended attributes may touch two data buffers, two bitmap buffers,
++ * and two group and summaries. */
 +
-+              cache->shrink(priority, gfp_mask);
-+      }
-+      up(&other_caches_sem);
-+}
++#define EXT3_XATTR_TRANS_BLOCKS               8
 +
- /*
-  * The swap-out function returns 1 if it successfully
-  * scanned all the pages it was asked to (`count').
-@@ -578,6 +612,7 @@
+ /* Define the minimum size for a transaction which modifies data.  This
+  * needs to take into account the fact that we may end up modifying two
+  * quota files too (one for the group, one for the user quota).  The
+  * superblock only gets updated once, of course, so don't bother
+  * counting that again for the quota updates. */
  
-       shrink_dcache_memory(priority, gfp_mask);
-       shrink_icache_memory(priority, gfp_mask);
-+      shrink_other_caches(priority, gfp_mask);
- #ifdef CONFIG_QUOTA
-       shrink_dqcache_memory(DEF_PRIORITY, gfp_mask);
- #endif
-Index: linux-2.4.19-pre1/fs/ext3/ext3-exports.c
-===================================================================
---- linux-2.4.19-pre1.orig/fs/ext3/ext3-exports.c      2003-11-21 03:51:05.000000000 +0300
-+++ linux-2.4.19-pre1/fs/ext3/ext3-exports.c   2003-11-21 03:51:05.000000000 +0300
-@@ -0,0 +1,13 @@
-+#include <linux/config.h>
-+#include <linux/module.h>
-+#include <linux/ext3_fs.h>
-+#include <linux/ext3_jbd.h>
-+#include <linux/ext3_xattr.h>
-+
-+EXPORT_SYMBOL(ext3_force_commit);
-+EXPORT_SYMBOL(ext3_bread);
-+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.19-pre1/include/linux/xattr.h
+-#define EXT3_DATA_TRANS_BLOCKS                (3 * EXT3_SINGLEDATA_TRANS_BLOCKS - 2)
++#define EXT3_DATA_TRANS_BLOCKS                (3 * EXT3_SINGLEDATA_TRANS_BLOCKS + \
++                                       EXT3_XATTR_TRANS_BLOCKS - 2)
+ extern int ext3_writepage_trans_blocks(struct inode *inode);
+Index: linux-2.4.19-pre1/include/linux/ext3_xattr.h
 ===================================================================
---- linux-2.4.19-pre1.orig/include/linux/xattr.h       2003-11-21 03:51:05.000000000 +0300
-+++ linux-2.4.19-pre1/include/linux/xattr.h    2003-11-21 03:51:05.000000000 +0300
-@@ -0,0 +1,15 @@
+--- linux-2.4.19-pre1.orig/include/linux/ext3_xattr.h  2003-01-30 13:24:37.000000000 +0300
++++ linux-2.4.19-pre1/include/linux/ext3_xattr.h       2004-01-14 01:11:49.000000000 +0300
+@@ -0,0 +1,157 @@
 +/*
-+  File: linux/xattr.h
++  File: linux/ext3_xattr.h
 +
-+  Extended attributes handling.
++  On-disk format of extended attributes for the ext3 filesystem.
 +
-+  Copyright (C) 2001 by Andreas Gruenbacher <a.gruenbacher@computer.org>
-+  Copyright (c) 2001-2002 Silicon Graphics, Inc.  All Rights Reserved.
++  (C) 2001 Andreas Gruenbacher, <a.gruenbacher@computer.org>
 +*/
-+#ifndef _LINUX_XATTR_H
-+#define _LINUX_XATTR_H
 +
-+#define XATTR_CREATE  0x1     /* set the value, fail if attr already exists */
-+#define XATTR_REPLACE 0x2     /* set the value, fail if attr does not exist */
++#include <linux/config.h>
++#include <linux/init.h>
++#include <linux/xattr.h>
 +
-+#endif        /* _LINUX_XATTR_H */
-Index: linux-2.4.19-pre1/arch/i386/kernel/entry.S
-===================================================================
---- linux-2.4.19-pre1.orig/arch/i386/kernel/entry.S    2003-11-21 03:38:55.000000000 +0300
-+++ linux-2.4.19-pre1/arch/i386/kernel/entry.S 2003-11-21 03:51:05.000000000 +0300
-@@ -622,18 +622,18 @@
-       .long SYMBOL_NAME(sys_ni_syscall)       /* Reserved for Security */
-       .long SYMBOL_NAME(sys_gettid)
-       .long SYMBOL_NAME(sys_readahead)        /* 225 */
--      .long SYMBOL_NAME(sys_ni_syscall)       /* reserved for setxattr */
--      .long SYMBOL_NAME(sys_ni_syscall)       /* reserved for lsetxattr */
--      .long SYMBOL_NAME(sys_ni_syscall)       /* reserved for fsetxattr */
--      .long SYMBOL_NAME(sys_ni_syscall)       /* reserved for getxattr */
--      .long SYMBOL_NAME(sys_ni_syscall)       /* 230 reserved for lgetxattr */
--      .long SYMBOL_NAME(sys_ni_syscall)       /* reserved for fgetxattr */
--      .long SYMBOL_NAME(sys_ni_syscall)       /* reserved for listxattr */
--      .long SYMBOL_NAME(sys_ni_syscall)       /* reserved for llistxattr */
--      .long SYMBOL_NAME(sys_ni_syscall)       /* reserved for flistxattr */
--      .long SYMBOL_NAME(sys_ni_syscall)       /* 235 reserved for removexattr */
--      .long SYMBOL_NAME(sys_ni_syscall)       /* reserved for lremovexattr */
--      .long SYMBOL_NAME(sys_ni_syscall)       /* reserved for fremovexattr */
-+      .long SYMBOL_NAME(sys_setxattr)
-+      .long SYMBOL_NAME(sys_lsetxattr)
-+      .long SYMBOL_NAME(sys_fsetxattr)
-+      .long SYMBOL_NAME(sys_getxattr)
-+      .long SYMBOL_NAME(sys_lgetxattr)        /* 230 */
-+      .long SYMBOL_NAME(sys_fgetxattr)
-+      .long SYMBOL_NAME(sys_listxattr)
-+      .long SYMBOL_NAME(sys_llistxattr)
-+      .long SYMBOL_NAME(sys_flistxattr)
-+      .long SYMBOL_NAME(sys_removexattr)      /* 235 */
-+      .long SYMBOL_NAME(sys_lremovexattr)
-+      .long SYMBOL_NAME(sys_fremovexattr)
-       .rept NR_syscalls-(.-sys_call_table)/4
-               .long SYMBOL_NAME(sys_ni_syscall)
-Index: linux-2.4.19-pre1/fs/xattr.c
-===================================================================
---- linux-2.4.19-pre1.orig/fs/xattr.c  2003-11-21 03:51:05.000000000 +0300
-+++ linux-2.4.19-pre1/fs/xattr.c       2003-11-21 03:51:05.000000000 +0300
-@@ -0,0 +1,355 @@
-+/*
-+  File: fs/xattr.c
++/* Magic value in attribute blocks */
++#define EXT3_XATTR_MAGIC              0xEA020000
 +
-+  Extended attribute handling.
++/* Maximum number of references to one attribute block */
++#define EXT3_XATTR_REFCOUNT_MAX               1024
 +
-+  Copyright (C) 2001 by Andreas Gruenbacher <a.gruenbacher@computer.org>
-+  Copyright (C) 2001 SGI - Silicon Graphics, Inc <linux-xfs@oss.sgi.com>
-+ */
-+#include <linux/fs.h>
-+#include <linux/slab.h>
-+#include <linux/vmalloc.h>
-+#include <linux/smp_lock.h>
-+#include <linux/file.h>
-+#include <linux/xattr.h>
-+#include <asm/uaccess.h>
++/* Name indexes */
++#define EXT3_XATTR_INDEX_MAX                  10
++#define EXT3_XATTR_INDEX_USER                 1
++#define EXT3_XATTR_INDEX_POSIX_ACL_ACCESS     2
++#define EXT3_XATTR_INDEX_POSIX_ACL_DEFAULT    3
 +
-+/*
-+ * Extended attribute memory allocation wrappers, originally
-+ * based on the Intermezzo PRESTO_ALLOC/PRESTO_FREE macros.
-+ * The vmalloc use here is very uncommon - extended attributes
-+ * are supposed to be small chunks of metadata, and it is quite
-+ * unusual to have very many extended attributes, so lists tend
-+ * to be quite short as well.  The 64K upper limit is derived
-+ * from the extended attribute size limit used by XFS.
-+ * Intentionally allow zero @size for value/list size requests.
-+ */
-+static void *
-+xattr_alloc(size_t size, size_t limit)
-+{
-+      void *ptr;
++struct ext3_xattr_header {
++      __u32   h_magic;        /* magic number for identification */
++      __u32   h_refcount;     /* reference count */
++      __u32   h_blocks;       /* number of disk blocks used */
++      __u32   h_hash;         /* hash value of all attributes */
++      __u32   h_reserved[4];  /* zero right now */
++};
 +
-+      if (size > limit)
-+              return ERR_PTR(-E2BIG);
++struct ext3_xattr_entry {
++      __u8    e_name_len;     /* length of name */
++      __u8    e_name_index;   /* attribute name index */
++      __u16   e_value_offs;   /* offset in disk block of value */
++      __u32   e_value_block;  /* disk block attribute is stored on (n/i) */
++      __u32   e_value_size;   /* size of attribute value */
++      __u32   e_hash;         /* hash value of name and value */
++      char    e_name[0];      /* attribute name */
++};
 +
-+      if (!size)      /* size request, no buffer is needed */
-+              return NULL;
-+      else if (size <= PAGE_SIZE)
-+              ptr = kmalloc((unsigned long) size, GFP_KERNEL);
-+      else
-+              ptr = vmalloc((unsigned long) size);
-+      if (!ptr)
-+              return ERR_PTR(-ENOMEM);
-+      return ptr;
-+}
++#define EXT3_XATTR_PAD_BITS           2
++#define EXT3_XATTR_PAD                (1<<EXT3_XATTR_PAD_BITS)
++#define EXT3_XATTR_ROUND              (EXT3_XATTR_PAD-1)
++#define EXT3_XATTR_LEN(name_len) \
++      (((name_len) + EXT3_XATTR_ROUND + \
++      sizeof(struct ext3_xattr_entry)) & ~EXT3_XATTR_ROUND)
++#define EXT3_XATTR_NEXT(entry) \
++      ( (struct ext3_xattr_entry *)( \
++        (char *)(entry) + EXT3_XATTR_LEN((entry)->e_name_len)) )
++#define EXT3_XATTR_SIZE(size) \
++      (((size) + EXT3_XATTR_ROUND) & ~EXT3_XATTR_ROUND)
 +
-+static void
-+xattr_free(void *ptr, size_t size)
-+{
-+      if (!size)      /* size request, no buffer was needed */
-+              return;
-+      else if (size <= PAGE_SIZE)
-+              kfree(ptr);
-+      else
-+              vfree(ptr);
-+}
++#ifdef __KERNEL__
 +
-+/*
-+ * Extended attribute SET operations
-+ */
-+static long
-+setxattr(struct dentry *d, char *name, void *value, size_t size, int flags)
-+{
-+      int error;
-+      void *kvalue;
-+      char kname[XATTR_NAME_MAX + 1];
++# ifdef CONFIG_EXT3_FS_XATTR
 +
-+      if (flags & ~(XATTR_CREATE|XATTR_REPLACE))
-+              return -EINVAL;
++struct ext3_xattr_handler {
++      char *prefix;
++      size_t (*list)(char *list, struct inode *inode, const char *name,
++                     int name_len);
++      int (*get)(struct inode *inode, const char *name, void *buffer,
++                 size_t size);
++      int (*set)(struct inode *inode, const char *name, const void *buffer,
++                 size_t size, int flags);
++};
 +
-+      error = strncpy_from_user(kname, name, sizeof(kname));
-+      if (error == 0 || error == sizeof(kname))
-+              error = -ERANGE;
-+      if (error < 0)
-+              return error;
++extern int ext3_xattr_register(int, struct ext3_xattr_handler *);
++extern void ext3_xattr_unregister(int, struct ext3_xattr_handler *);
 +
-+      kvalue = xattr_alloc(size, XATTR_SIZE_MAX);
-+      if (IS_ERR(kvalue))
-+              return PTR_ERR(kvalue);
++extern int ext3_setxattr(struct dentry *, const char *, const void *, size_t, int);
++extern ssize_t ext3_getxattr(struct dentry *, const char *, void *, size_t);
++extern ssize_t ext3_listxattr(struct dentry *, char *, size_t);
++extern int ext3_removexattr(struct dentry *, const char *);
 +
-+      if (size > 0 && copy_from_user(kvalue, value, size)) {
-+              xattr_free(kvalue, size);
-+              return -EFAULT;
-+      }
++extern int ext3_xattr_get(struct inode *, int, const char *, void *, size_t);
++extern int ext3_xattr_list(struct inode *, char *, size_t);
++extern int ext3_xattr_set(handle_t *handle, struct inode *, int, const char *, const void *, size_t, int);
 +
-+      error = -EOPNOTSUPP;
-+      if (d->d_inode->i_op && d->d_inode->i_op->setxattr) {
-+              down(&d->d_inode->i_sem);
-+              lock_kernel();
-+              error = d->d_inode->i_op->setxattr(d, kname, kvalue, size, flags);
-+              unlock_kernel();
-+              up(&d->d_inode->i_sem);
-+      }
++extern void ext3_xattr_delete_inode(handle_t *, struct inode *);
++extern void ext3_xattr_put_super(struct super_block *);
 +
-+      xattr_free(kvalue, size);
-+      return error;
-+}
++extern int init_ext3_xattr(void) __init;
++extern void exit_ext3_xattr(void);
 +
-+asmlinkage long
-+sys_setxattr(char *path, char *name, void *value, size_t size, int flags)
-+{
-+      struct nameidata nd;
-+      int error;
++# else  /* CONFIG_EXT3_FS_XATTR */
++#  define ext3_setxattr               NULL
++#  define ext3_getxattr               NULL
++#  define ext3_listxattr      NULL
++#  define ext3_removexattr    NULL
 +
-+      error = user_path_walk(path, &nd);
-+      if (error)
-+              return error;
-+      error = setxattr(nd.dentry, name, value, size, flags);
-+      path_release(&nd);
-+      return error;
++static inline int
++ext3_xattr_get(struct inode *inode, int name_index, const char *name,
++             void *buffer, size_t size)
++{
++      return -ENOTSUP;
 +}
 +
-+asmlinkage long
-+sys_lsetxattr(char *path, char *name, void *value, size_t size, int flags)
++static inline int
++ext3_xattr_list(struct inode *inode, void *buffer, size_t size)
 +{
-+      struct nameidata nd;
-+      int error;
-+
-+      error = user_path_walk_link(path, &nd);
-+      if (error)
-+              return error;
-+      error = setxattr(nd.dentry, name, value, size, flags);
-+      path_release(&nd);
-+      return error;
++      return -ENOTSUP;
 +}
 +
-+asmlinkage long
-+sys_fsetxattr(int fd, char *name, void *value, size_t size, int flags)
++static inline int
++ext3_xattr_set(handle_t *handle, struct inode *inode, int name_index,
++             const char *name, const void *value, size_t size, int flags)
 +{
-+      struct file *f;
-+      int error = -EBADF;
-+
-+      f = fget(fd);
-+      if (!f)
-+              return error;
-+      error = setxattr(f->f_dentry, name, value, size, flags);
-+      fput(f);
-+      return error;
++      return -ENOTSUP;
 +}
 +
-+/*
-+ * Extended attribute GET operations
-+ */
-+static ssize_t
-+getxattr(struct dentry *d, char *name, void *value, size_t size)
++static inline void
++ext3_xattr_delete_inode(handle_t *handle, struct inode *inode)
 +{
-+      ssize_t error;
-+      void *kvalue;
-+      char kname[XATTR_NAME_MAX + 1];
-+
-+      error = strncpy_from_user(kname, name, sizeof(kname));
-+      if (error == 0 || error == sizeof(kname))
-+              error = -ERANGE;
-+      if (error < 0)
-+              return error;
-+
-+      kvalue = xattr_alloc(size, XATTR_SIZE_MAX);
-+      if (IS_ERR(kvalue))
-+              return PTR_ERR(kvalue);
-+
-+      error = -EOPNOTSUPP;
-+      if (d->d_inode->i_op && d->d_inode->i_op->getxattr) {
-+              down(&d->d_inode->i_sem);
-+              lock_kernel();
-+              error = d->d_inode->i_op->getxattr(d, kname, kvalue, size);
-+              unlock_kernel();
-+              up(&d->d_inode->i_sem);
-+      }
-+
-+      if (kvalue && error > 0)
-+              if (copy_to_user(value, kvalue, error))
-+                      error = -EFAULT;
-+      xattr_free(kvalue, size);
-+      return error;
 +}
 +
-+asmlinkage ssize_t
-+sys_getxattr(char *path, char *name, void *value, size_t size)
++static inline void
++ext3_xattr_put_super(struct super_block *sb)
 +{
-+      struct nameidata nd;
-+      ssize_t error;
-+
-+      error = user_path_walk(path, &nd);
-+      if (error)
-+              return error;
-+      error = getxattr(nd.dentry, name, value, size);
-+      path_release(&nd);
-+      return error;
 +}
 +
-+asmlinkage ssize_t
-+sys_lgetxattr(char *path, char *name, void *value, size_t size)
++static inline int
++init_ext3_xattr(void)
 +{
-+      struct nameidata nd;
-+      ssize_t error;
-+
-+      error = user_path_walk_link(path, &nd);
-+      if (error)
-+              return error;
-+      error = getxattr(nd.dentry, name, value, size);
-+      path_release(&nd);
-+      return error;
++      return 0;
 +}
 +
-+asmlinkage ssize_t
-+sys_fgetxattr(int fd, char *name, void *value, size_t size)
++static inline void
++exit_ext3_xattr(void)
 +{
-+      struct file *f;
-+      ssize_t error = -EBADF;
++}
 +
-+      f = fget(fd);
-+      if (!f)
-+              return error;
-+      error = getxattr(f->f_dentry, name, value, size);
-+      fput(f);
-+      return error;
++# endif  /* CONFIG_EXT3_FS_XATTR */
++
++# ifdef CONFIG_EXT3_FS_XATTR_USER
++
++extern int init_ext3_xattr_user(void) __init;
++extern void exit_ext3_xattr_user(void);
++
++# else  /* CONFIG_EXT3_FS_XATTR_USER */
++
++static inline int
++init_ext3_xattr_user(void)
++{
++      return 0;
 +}
 +
-+/*
-+ * Extended attribute LIST operations
-+ */
-+static ssize_t
-+listxattr(struct dentry *d, char *list, size_t size)
++static inline void
++exit_ext3_xattr_user(void)
 +{
-+      ssize_t error;
-+      char *klist;
++}
 +
-+      klist = (char *)xattr_alloc(size, XATTR_LIST_MAX);
-+      if (IS_ERR(klist))
-+              return PTR_ERR(klist);
++#endif  /* CONFIG_EXT3_FS_XATTR_USER */
 +
-+      error = -EOPNOTSUPP;
-+      if (d->d_inode->i_op && d->d_inode->i_op->listxattr) {
-+              down(&d->d_inode->i_sem);
-+              lock_kernel();
-+              error = d->d_inode->i_op->listxattr(d, klist, size);
-+              unlock_kernel();
-+              up(&d->d_inode->i_sem);
-+      }
++#endif  /* __KERNEL__ */
 +
-+      if (klist && error > 0)
-+              if (copy_to_user(list, klist, error))
-+                      error = -EFAULT;
-+      xattr_free(klist, size);
-+      return error;
-+}
+Index: linux-2.4.19-pre1/include/linux/fs.h
+===================================================================
+--- linux-2.4.19-pre1.orig/include/linux/fs.h  2004-01-14 01:11:48.000000000 +0300
++++ linux-2.4.19-pre1/include/linux/fs.h       2004-01-14 01:11:49.000000000 +0300
+@@ -872,6 +872,10 @@
+       int (*setattr) (struct dentry *, struct iattr *);
+       int (*setattr_raw) (struct inode *, struct iattr *);
+       int (*getattr) (struct dentry *, struct iattr *);
++      int (*setxattr) (struct dentry *, const char *, const void *, size_t, int);
++      ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
++      ssize_t (*listxattr) (struct dentry *, char *, size_t);
++      int (*removexattr) (struct dentry *, const char *);
+ };
+ struct seq_file;
+Index: linux-2.4.19-pre1/include/linux/mbcache.h
+===================================================================
+--- linux-2.4.19-pre1.orig/include/linux/mbcache.h     2003-01-30 13:24:37.000000000 +0300
++++ linux-2.4.19-pre1/include/linux/mbcache.h  2004-01-14 01:11:49.000000000 +0300
+@@ -0,0 +1,69 @@
++/*
++  File: linux/mbcache.h
 +
-+asmlinkage ssize_t
-+sys_listxattr(char *path, char *list, size_t size)
-+{
-+      struct nameidata nd;
-+      ssize_t error;
++  (C) 2001 by Andreas Gruenbacher, <a.gruenbacher@computer.org>
++*/
 +
-+      error = user_path_walk(path, &nd);
-+      if (error)
-+              return error;
-+      error = listxattr(nd.dentry, list, size);
-+      path_release(&nd);
-+      return error;
-+}
++/* Hardwire the number of additional indexes */
++#define MB_CACHE_INDEXES_COUNT 1
 +
-+asmlinkage ssize_t
-+sys_llistxattr(char *path, char *list, size_t size)
-+{
-+      struct nameidata nd;
-+      ssize_t error;
++struct mb_cache_entry;
 +
-+      error = user_path_walk_link(path, &nd);
-+      if (error)
-+              return error;
-+      error = listxattr(nd.dentry, list, size);
-+      path_release(&nd);
-+      return error;
-+}
++struct mb_cache_op {
++      int (*free)(struct mb_cache_entry *, int);
++};
 +
-+asmlinkage ssize_t
-+sys_flistxattr(int fd, char *list, size_t size)
-+{
-+      struct file *f;
-+      ssize_t error = -EBADF;
++struct mb_cache {
++      struct list_head                c_cache_list;
++      const char                      *c_name;
++      struct mb_cache_op              c_op;
++      atomic_t                        c_entry_count;
++      int                             c_bucket_count;
++#ifndef MB_CACHE_INDEXES_COUNT
++      int                             c_indexes_count;
++#endif
++      kmem_cache_t                    *c_entry_cache;
++      struct list_head                *c_block_hash;
++      struct list_head                *c_indexes_hash[0];
++};
 +
-+      f = fget(fd);
-+      if (!f)
-+              return error;
-+      error = listxattr(f->f_dentry, list, size);
-+      fput(f);
-+      return error;
-+}
++struct mb_cache_entry_index {
++      struct list_head                o_list;
++      unsigned int                    o_key;
++};
 +
-+/*
-+ * Extended attribute REMOVE operations
-+ */
-+static long
-+removexattr(struct dentry *d, char *name)
-+{
-+      int error;
-+      char kname[XATTR_NAME_MAX + 1];
++struct mb_cache_entry {
++      struct list_head                e_lru_list;
++      struct mb_cache                 *e_cache;
++      atomic_t                        e_used;
++      kdev_t                          e_dev;
++      unsigned long                   e_block;
++      struct list_head                e_block_list;
++      struct mb_cache_entry_index     e_indexes[0];
++};
 +
-+      error = strncpy_from_user(kname, name, sizeof(kname));
-+      if (error == 0 || error == sizeof(kname))
-+              error = -ERANGE;
-+      if (error < 0)
-+              return error;
++/* Functions on caches */
 +
-+      error = -EOPNOTSUPP;
-+      if (d->d_inode->i_op && d->d_inode->i_op->removexattr) {
-+              down(&d->d_inode->i_sem);
-+              lock_kernel();
-+              error = d->d_inode->i_op->removexattr(d, kname);
-+              unlock_kernel();
-+              up(&d->d_inode->i_sem);
-+      }
-+      return error;
-+}
++struct mb_cache * mb_cache_create(const char *, struct mb_cache_op *, size_t,
++                                int, int);
++void mb_cache_shrink(struct mb_cache *, kdev_t);
++void mb_cache_destroy(struct mb_cache *);
 +
-+asmlinkage long
-+sys_removexattr(char *path, char *name)
-+{
-+      struct nameidata nd;
-+      int error;
++/* Functions on cache entries */
 +
-+      error = user_path_walk(path, &nd);
-+      if (error)
-+              return error;
-+      error = removexattr(nd.dentry, name);
-+      path_release(&nd);
-+      return error;
-+}
++struct mb_cache_entry *mb_cache_entry_alloc(struct mb_cache *);
++int mb_cache_entry_insert(struct mb_cache_entry *, kdev_t, unsigned long,
++                        unsigned int[]);
++void mb_cache_entry_rehash(struct mb_cache_entry *, unsigned int[]);
++void mb_cache_entry_release(struct mb_cache_entry *);
++void mb_cache_entry_takeout(struct mb_cache_entry *);
++void mb_cache_entry_free(struct mb_cache_entry *);
++struct mb_cache_entry *mb_cache_entry_dup(struct mb_cache_entry *);
++struct mb_cache_entry *mb_cache_entry_get(struct mb_cache *, kdev_t,
++                                        unsigned long);
++#if !defined(MB_CACHE_INDEXES_COUNT) || (MB_CACHE_INDEXES_COUNT > 0)
++struct mb_cache_entry *mb_cache_entry_find_first(struct mb_cache *cache, int,
++                                               kdev_t, unsigned int);
++struct mb_cache_entry *mb_cache_entry_find_next(struct mb_cache_entry *, int,
++                                              kdev_t, unsigned int);
++#endif
+Index: linux-2.4.19-pre1/include/linux/xattr.h
+===================================================================
+--- linux-2.4.19-pre1.orig/include/linux/xattr.h       2003-01-30 13:24:37.000000000 +0300
++++ linux-2.4.19-pre1/include/linux/xattr.h    2004-01-14 01:11:49.000000000 +0300
+@@ -0,0 +1,15 @@
++/*
++  File: linux/xattr.h
 +
-+asmlinkage long
-+sys_lremovexattr(char *path, char *name)
-+{
-+      struct nameidata nd;
-+      int error;
++  Extended attributes handling.
 +
-+      error = user_path_walk_link(path, &nd);
-+      if (error)
-+              return error;
-+      error = removexattr(nd.dentry, name);
-+      path_release(&nd);
-+      return error;
-+}
++  Copyright (C) 2001 by Andreas Gruenbacher <a.gruenbacher@computer.org>
++  Copyright (c) 2001-2002 Silicon Graphics, Inc.  All Rights Reserved.
++*/
++#ifndef _LINUX_XATTR_H
++#define _LINUX_XATTR_H
 +
-+asmlinkage long
-+sys_fremovexattr(int fd, char *name)
-+{
-+      struct file *f;
-+      int error = -EBADF;
++#define XATTR_CREATE  0x1     /* set the value, fail if attr already exists */
++#define XATTR_REPLACE 0x2     /* set the value, fail if attr does not exist */
 +
-+      f = fget(fd);
-+      if (!f)
-+              return error;
-+      error = removexattr(f->f_dentry, name);
-+      fput(f);
-+      return error;
-+}
++#endif        /* _LINUX_XATTR_H */
 Index: linux-2.4.19-pre1/include/linux/kernel.h
 ===================================================================
---- linux-2.4.19-pre1.orig/include/linux/kernel.h      2003-11-21 02:25:34.000000000 +0300
-+++ linux-2.4.19-pre1/include/linux/kernel.h   2003-11-21 03:51:05.000000000 +0300
+--- linux-2.4.19-pre1.orig/include/linux/kernel.h      2004-01-14 01:10:37.000000000 +0300
++++ linux-2.4.19-pre1/include/linux/kernel.h   2004-01-14 01:16:51.000000000 +0300
 @@ -11,6 +11,7 @@
  #include <linux/linkage.h>
  #include <linux/stddef.h>
@@ -6036,3 +5947,106 @@ Index: linux-2.4.19-pre1/include/linux/kernel.h
  
  /* Optimization barrier */
  /* The "volatile" is due to gcc bugs */
+Index: linux-2.4.19-pre1/include/linux/limits.h
+===================================================================
+--- linux-2.4.19-pre1.orig/include/linux/limits.h      2004-01-14 01:10:37.000000000 +0300
++++ linux-2.4.19-pre1/include/linux/limits.h   2004-01-14 01:22:08.000000000 +0300
+@@ -13,6 +13,9 @@
+ #define NAME_MAX         255  /* # chars in a file name */
+ #define PATH_MAX        4096  /* # chars in a path name including nul */
+ #define PIPE_BUF        4096  /* # bytes in atomic write to a pipe */
++#define XATTR_NAME_MAX   255  /* # chars in an extended attribute name */
++#define XATTR_SIZE_MAX 65536  /* size of an extended attribute value (64k) */
++#define XATTR_LIST_MAX 65536  /* size of extended attribute namelist (64k) */
+ #define RTSIG_MAX       32
+Index: linux-2.4.19-pre1/kernel/ksyms.c
+===================================================================
+--- linux-2.4.19-pre1.orig/kernel/ksyms.c      2004-01-14 01:11:48.000000000 +0300
++++ linux-2.4.19-pre1/kernel/ksyms.c   2004-01-14 01:11:49.000000000 +0300
+@@ -11,6 +11,7 @@
+ #include <linux/config.h>
+ #include <linux/slab.h>
++#include <linux/cache_def.h>
+ #include <linux/module.h>
+ #include <linux/blkdev.h>
+ #include <linux/cdrom.h>
+@@ -88,6 +89,7 @@
+ EXPORT_SYMBOL(exit_files);
+ EXPORT_SYMBOL(exit_fs);
+ EXPORT_SYMBOL(exit_sighand);
++EXPORT_SYMBOL(copy_fs_struct);
+ /* internal kernel memory management */
+ EXPORT_SYMBOL(_alloc_pages);
+@@ -104,6 +106,8 @@
+ EXPORT_SYMBOL(kmem_cache_shrink);
+ EXPORT_SYMBOL(kmem_cache_alloc);
+ EXPORT_SYMBOL(kmem_cache_free);
++EXPORT_SYMBOL(register_cache);
++EXPORT_SYMBOL(unregister_cache);
+ EXPORT_SYMBOL(kmalloc);
+ EXPORT_SYMBOL(kfree);
+ EXPORT_SYMBOL(vfree);
+Index: linux-2.4.19-pre1/mm/vmscan.c
+===================================================================
+--- linux-2.4.19-pre1.orig/mm/vmscan.c 2004-01-14 01:10:37.000000000 +0300
++++ linux-2.4.19-pre1/mm/vmscan.c      2004-01-14 01:11:49.000000000 +0300
+@@ -15,6 +15,7 @@
+ #include <linux/kernel_stat.h>
+ #include <linux/swap.h>
+ #include <linux/swapctl.h>
++#include <linux/cache_def.h>
+ #include <linux/smp_lock.h>
+ #include <linux/pagemap.h>
+ #include <linux/init.h>
+@@ -32,6 +33,39 @@
+  */
+ #define DEF_PRIORITY (6)
++static DECLARE_MUTEX(other_caches_sem);
++static LIST_HEAD(cache_definitions);
++
++void register_cache(struct cache_definition *cache)
++{
++      down(&other_caches_sem);
++      list_add(&cache->link, &cache_definitions);
++      up(&other_caches_sem);
++}
++
++void unregister_cache(struct cache_definition *cache)
++{
++      down(&other_caches_sem);
++      list_del(&cache->link);
++      up(&other_caches_sem);
++}
++
++static void shrink_other_caches(unsigned int priority, int gfp_mask)
++{
++      struct list_head *p;
++
++      if (down_trylock(&other_caches_sem))
++              return;
++
++      list_for_each_prev(p, &cache_definitions) {
++              struct cache_definition *cache =
++                      list_entry(p, struct cache_definition, link);
++
++              cache->shrink(priority, gfp_mask);
++      }
++      up(&other_caches_sem);
++}
++
+ /*
+  * The swap-out function returns 1 if it successfully
+  * scanned all the pages it was asked to (`count').
+@@ -578,6 +612,7 @@
+       shrink_dcache_memory(priority, gfp_mask);
+       shrink_icache_memory(priority, gfp_mask);
++      shrink_other_caches(priority, gfp_mask);
+ #ifdef CONFIG_QUOTA
+       shrink_dqcache_memory(DEF_PRIORITY, gfp_mask);
+ #endif
diff --git a/lustre/kernel_patches/patches/tcp-zero-copy-2.4.19-pre1.patch b/lustre/kernel_patches/patches/tcp-zero-copy-2.4.19-pre1.patch
new file mode 100644 (file)
index 0000000..bcd3f73
--- /dev/null
@@ -0,0 +1,461 @@
+Index: linux-2.4.19-pre1/include/linux/skbuff.h
+===================================================================
+--- linux-2.4.19-pre1.orig/include/linux/skbuff.h      2001-11-22 22:46:26.000000000 +0300
++++ linux-2.4.19-pre1/include/linux/skbuff.h   2004-01-14 01:15:13.000000000 +0300
+@@ -116,6 +116,30 @@
+       __u16 size;
+ };
++/* Support for callback when skb data has been released */
++typedef struct zccd                           /* Zero Copy Callback Descriptor */
++{                                             /* (embed as first member of custom struct) */
++      atomic_t        zccd_count;             /* reference count */
++      void           (*zccd_destructor)(struct zccd *); /* callback when refcount reaches zero */
++} zccd_t;
++
++static inline void zccd_init (zccd_t *d, void (*callback)(zccd_t *))
++{
++      atomic_set (&d->zccd_count, 1);
++      d->zccd_destructor = callback;
++}
++
++static inline void zccd_get (zccd_t *d)               /* take a reference */
++{
++      atomic_inc (&d->zccd_count);
++}
++
++static inline void zccd_put (zccd_t *d)               /* release a reference */
++{
++      if (atomic_dec_and_test (&d->zccd_count))
++              (d->zccd_destructor)(d);
++}
++
+ /* This data is invariant across clones and lives at
+  * the end of the header data, ie. at skb->end.
+  */
+@@ -123,6 +147,12 @@
+       atomic_t        dataref;
+       unsigned int    nr_frags;
+       struct sk_buff  *frag_list;
++      zccd_t          *zccd;                  /* zero copy descriptor */
++      zccd_t          *zccd2;                 /* 2nd zero copy descriptor */
++      /* NB we expect zero-copy data to be at least 1 packet, so
++       * having 2 zccds means we don't unneccessarily split the packet
++       * where consecutive zero-copy sends abutt.
++       */
+       skb_frag_t      frags[MAX_SKB_FRAGS];
+ };
+Index: linux-2.4.19-pre1/include/net/tcp.h
+===================================================================
+--- linux-2.4.19-pre1.orig/include/net/tcp.h   2001-11-22 22:47:22.000000000 +0300
++++ linux-2.4.19-pre1/include/net/tcp.h        2004-01-14 01:15:13.000000000 +0300
+@@ -640,6 +640,8 @@
+ extern int                    tcp_sendmsg(struct sock *sk, struct msghdr *msg, int size);
+ extern ssize_t                        tcp_sendpage(struct socket *sock, struct page *page, int offset, size_t size, int flags);
++extern ssize_t                        tcp_sendpage_zccd(struct socket *sock, struct page *page, int offset, size_t size,
++                                                int flags, zccd_t *zccd);
+ extern int                    tcp_ioctl(struct sock *sk, 
+                                         int cmd, 
+@@ -733,6 +735,9 @@
+                                           struct msghdr *msg,
+                                           int len, int nonblock, 
+                                           int flags, int *addr_len);
++extern int                    tcp_recvpackets(struct sock *sk,
++                                              struct sk_buff_head *packets,
++                                              int len, int nonblock);
+ extern int                    tcp_listen_start(struct sock *sk);
+Index: linux-2.4.19-pre1/net/netsyms.c
+===================================================================
+--- linux-2.4.19-pre1.orig/net/netsyms.c       2004-01-14 01:10:37.000000000 +0300
++++ linux-2.4.19-pre1/net/netsyms.c    2004-01-14 01:15:54.000000000 +0300
+@@ -409,6 +409,9 @@
+ #endif
++EXPORT_SYMBOL(tcp_sendpage_zccd);
++EXPORT_SYMBOL(tcp_recvpackets);
++
+ EXPORT_SYMBOL(netlink_set_err);
+ EXPORT_SYMBOL(netlink_broadcast);
+ EXPORT_SYMBOL(netlink_unicast);
+Index: linux-2.4.19-pre1/net/core/skbuff.c
+===================================================================
+--- linux-2.4.19-pre1.orig/net/core/skbuff.c   2001-12-21 20:42:05.000000000 +0300
++++ linux-2.4.19-pre1/net/core/skbuff.c        2004-01-14 01:15:13.000000000 +0300
+@@ -208,6 +208,8 @@
+       atomic_set(&(skb_shinfo(skb)->dataref), 1);
+       skb_shinfo(skb)->nr_frags = 0;
+       skb_shinfo(skb)->frag_list = NULL;
++      skb_shinfo(skb)->zccd = NULL;           /* skbuffs kick off with NO user zero copy descriptors */
++      skb_shinfo(skb)->zccd2 = NULL;
+       return skb;
+ nodata:
+@@ -276,6 +278,10 @@
+ {
+       if (!skb->cloned ||
+           atomic_dec_and_test(&(skb_shinfo(skb)->dataref))) {
++              if (skb_shinfo(skb)->zccd != NULL) /* zero copy callback descriptor? */
++                      zccd_put (skb_shinfo(skb)->zccd); /* release hold */
++              if (skb_shinfo(skb)->zccd2 != NULL) /* 2nd zero copy callback descriptor? */
++                      zccd_put (skb_shinfo(skb)->zccd2); /* release hold */
+               if (skb_shinfo(skb)->nr_frags) {
+                       int i;
+                       for (i = 0; i < skb_shinfo(skb)->nr_frags; i++)
+@@ -532,6 +538,8 @@
+       atomic_set(&(skb_shinfo(skb)->dataref), 1);
+       skb_shinfo(skb)->nr_frags = 0;
+       skb_shinfo(skb)->frag_list = NULL;
++      skb_shinfo(skb)->zccd = NULL;           /* copied data => no user zero copy descriptor */
++      skb_shinfo(skb)->zccd2 = NULL;
+       /* We are no longer a clone, even if we were. */
+       skb->cloned = 0;
+@@ -578,6 +586,14 @@
+       n->data_len = skb->data_len;
+       n->len = skb->len;
++      if (skb_shinfo(skb)->zccd != NULL)      /* user zero copy descriptor? */
++              zccd_get (skb_shinfo(skb)->zccd); /* 1 more ref (pages are shared) */
++      skb_shinfo(n)->zccd = skb_shinfo(skb)->zccd;
++
++      if (skb_shinfo(skb)->zccd2 != NULL)     /* 2nd user zero copy descriptor? */
++              zccd_get (skb_shinfo(skb)->zccd2); /* 1 more ref (pages are shared) */
++      skb_shinfo(n)->zccd2 = skb_shinfo(skb)->zccd2;
++
+       if (skb_shinfo(skb)->nr_frags) {
+               int i;
+@@ -620,6 +636,8 @@
+       u8 *data;
+       int size = nhead + (skb->end - skb->head) + ntail;
+       long off;
++      zccd_t *zccd = skb_shinfo(skb)->zccd;   /* stash user zero copy descriptor */
++      zccd_t *zccd2 = skb_shinfo(skb)->zccd2; /* stash 2nd user zero copy descriptor */
+       if (skb_shared(skb))
+               BUG();
+@@ -641,6 +659,11 @@
+       if (skb_shinfo(skb)->frag_list)
+               skb_clone_fraglist(skb);
++      if (zccd != NULL)                       /* user zero copy descriptor? */
++              zccd_get (zccd);                /* extra ref (pages are shared) */
++      if (zccd2 != NULL)                      /* 2nd user zero copy descriptor? */
++              zccd_get (zccd2);               /* extra ref (pages are shared) */
++
+       skb_release_data(skb);
+       off = (data+nhead) - skb->head;
+@@ -655,6 +678,8 @@
+       skb->nh.raw += off;
+       skb->cloned = 0;
+       atomic_set(&skb_shinfo(skb)->dataref, 1);
++      skb_shinfo(skb)->zccd = zccd;
++      skb_shinfo(skb)->zccd2 = zccd2;
+       return 0;
+ nodata:
+Index: linux-2.4.19-pre1/net/ipv4/tcp.c
+===================================================================
+--- linux-2.4.19-pre1.orig/net/ipv4/tcp.c      2001-12-21 20:42:05.000000000 +0300
++++ linux-2.4.19-pre1/net/ipv4/tcp.c   2004-01-14 01:15:13.000000000 +0300
+@@ -744,7 +744,7 @@
+       goto out;
+ }
+-ssize_t do_tcp_sendpages(struct sock *sk, struct page **pages, int poffset, size_t psize, int flags);
++ssize_t do_tcp_sendpages(struct sock *sk, struct page **pages, int poffset, size_t psize, int flags, zccd_t *zccd);
+ static inline int
+ can_coalesce(struct sk_buff *skb, int i, struct page *page, int off)
+@@ -823,7 +823,8 @@
+       return err;
+ }
+-ssize_t do_tcp_sendpages(struct sock *sk, struct page **pages, int poffset, size_t psize, int flags)
++/* Extra parameter: user zero copy descriptor (or NULL if not doing that) */
++ssize_t do_tcp_sendpages(struct sock *sk, struct page **pages, int poffset, size_t psize, int flags, zccd_t *zccd)
+ {
+       struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp);
+       int mss_now;
+@@ -871,6 +872,17 @@
+                       copy = size;
+               i = skb_shinfo(skb)->nr_frags;
++
++              if (zccd != NULL &&             /* this is a zcc I/O */
++                  skb_shinfo(skb)->zccd != NULL && /* skb is part of a zcc I/O */
++                  skb_shinfo(skb)->zccd2 != NULL &&
++                  skb_shinfo(skb)->zccd != zccd && /* not the same one */
++                  skb_shinfo(skb)->zccd2 != zccd)
++              {
++                      tcp_mark_push (tp, skb);
++                      goto new_segment;
++              }
++
+               if (can_coalesce(skb, i, page, offset)) {
+                       skb_shinfo(skb)->frags[i-1].size += copy;
+               } else if (i < MAX_SKB_FRAGS) {
+@@ -881,6 +893,20 @@
+                       goto new_segment;
+               }
++              if (zccd != NULL &&     /* this is a zcc I/O */
++                  skb_shinfo(skb)->zccd != zccd && /* not already referencing this zccd */
++                  skb_shinfo(skb)->zccd2 != zccd)
++              {
++                      zccd_get (zccd);        /* bump ref count */
++
++                      BUG_TRAP (skb_shinfo(skb)->zccd2 == NULL);
++
++                      if (skb_shinfo(skb)->zccd == NULL) /* reference this zccd */
++                              skb_shinfo(skb)->zccd = zccd;
++                      else
++                              skb_shinfo(skb)->zccd2 = zccd;
++              }
++
+               skb->len += copy;
+               skb->data_len += copy;
+               skb->ip_summed = CHECKSUM_HW;
+@@ -944,7 +970,31 @@
+       lock_sock(sk);
+       TCP_CHECK_TIMER(sk);
+-      res = do_tcp_sendpages(sk, &page, offset, size, flags);
++      res = do_tcp_sendpages(sk, &page, offset, size, flags, NULL);
++      TCP_CHECK_TIMER(sk);
++      release_sock(sk);
++      return res;
++}
++
++ssize_t tcp_sendpage_zccd(struct socket *sock, struct page *page, int offset, size_t size,
++                        int flags, zccd_t *zccd)
++{
++      ssize_t res;
++      struct sock *sk = sock->sk;
++
++#define TCP_ZC_CSUM_FLAGS (NETIF_F_IP_CSUM|NETIF_F_NO_CSUM|NETIF_F_HW_CSUM)
++
++      if (!(sk->route_caps & NETIF_F_SG) ||   /* caller shouldn't waste her time */
++          !(sk->route_caps & TCP_ZC_CSUM_FLAGS)) /* on double mapping */
++              BUG ();
++
++#undef TCP_ZC_CSUM_FLAGS
++
++      lock_sock(sk);
++      TCP_CHECK_TIMER(sk);
++
++      res = do_tcp_sendpages(sk, &page, offset, size, flags, zccd);
++
+       TCP_CHECK_TIMER(sk);
+       release_sock(sk);
+       return res;
+@@ -1683,6 +1733,202 @@
+       goto out;
+ }
++int tcp_recvpackets (struct sock *sk, struct sk_buff_head *packets,
++                   int len, int nonblock)
++{
++      struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp);
++      int copied;
++      long timeo;
++
++      BUG_TRAP (len > 0);
++      /*BUG_TRAP ((flags & (MSG_OOB | MSG_PEEK | MSG_TRUNC)) == 0);*/
++
++      lock_sock(sk);
++
++      TCP_CHECK_TIMER(sk);
++
++      copied = -ENOTCONN;
++      if (sk->state == TCP_LISTEN)
++              goto out;
++
++      copied = 0;
++      timeo = sock_rcvtimeo(sk, nonblock);
++
++      do {
++              struct sk_buff * skb;
++              u32 offset;
++              unsigned long used;
++              int exhausted;
++              int eaten;
++
++              /* Are we at urgent data? Stop if we have read anything. */
++              if (copied && tp->urg_data && tp->urg_seq == tp->copied_seq)
++                      break;
++
++              /* We need to check signals first, to get correct SIGURG
++               * handling. FIXME: Need to check this doesnt impact 1003.1g
++               * and move it down to the bottom of the loop
++               */
++              if (signal_pending(current)) {
++                      if (copied)
++                              break;
++                      copied = timeo ? sock_intr_errno(timeo) : -EAGAIN;
++                      break;
++              }
++
++              /* Next get a buffer. */
++
++              skb = skb_peek(&sk->receive_queue);
++
++              if (skb == NULL)                /* nothing ready */
++              {
++                      if (copied) {
++                              if (sk->err ||
++                                  sk->state == TCP_CLOSE ||
++                                  (sk->shutdown & RCV_SHUTDOWN) ||
++                                  !timeo ||
++                                  (0))
++                                      break;
++                      } else {
++                              if (sk->done)
++                                      break;
++
++                              if (sk->err) {
++                                      copied = sock_error(sk);
++                                      break;
++                              }
++
++                              if (sk->shutdown & RCV_SHUTDOWN)
++                                      break;
++
++                              if (sk->state == TCP_CLOSE) {
++                                      if (!sk->done) {
++                                              /* This occurs when user tries to read
++                                               * from never connected socket.
++                                               */
++                                              copied = -ENOTCONN;
++                                              break;
++                                      }
++                                      break;
++                              }
++
++                              if (!timeo) {
++                                      copied = -EAGAIN;
++                                      break;
++                              }
++                      }
++
++                      cleanup_rbuf(sk, copied);
++                      timeo = tcp_data_wait(sk, timeo);
++                      continue;
++              }
++
++              BUG_TRAP (atomic_read (&skb->users) == 1);
++
++              exhausted = eaten = 0;
++
++              offset = tp->copied_seq - TCP_SKB_CB(skb)->seq;
++              if (skb->h.th->syn)
++                      offset--;
++
++              used = skb->len - offset;
++
++              if (tp->urg_data) {
++                      u32 urg_offset = tp->urg_seq - tp->copied_seq;
++                      if (urg_offset < used) {
++                              if (!urg_offset) { /* at urgent date */
++                                      if (!sk->urginline) {
++                                              tp->copied_seq++; /* discard the single byte of urgent data */
++                                              offset++;
++                                              used--;
++                                      }
++                              } else          /* truncate read */
++                                      used = urg_offset;
++                      }
++              }
++
++              BUG_TRAP (used >= 0);
++              if (len < used)
++                      used = len;
++
++              if (used == 0)
++                      exhausted = 1;
++              else
++              {
++                      if (skb_is_nonlinear (skb))
++                      {
++                              int   rc = skb_linearize (skb, GFP_KERNEL);
++
++                              printk ("tcp_recvpackets(): linearising: %d\n", rc);
++
++                              if (rc)
++                              {
++                                      if (!copied)
++                                              copied = rc;
++                                      break;
++                              }
++                      }
++
++                      if ((offset + used) == skb->len) /* consuming the whole packet */
++                      {
++                              __skb_unlink (skb, &sk->receive_queue);
++                              dst_release (skb->dst);
++                              skb_orphan (skb);
++                              __skb_pull (skb, offset);
++                              __skb_queue_tail (packets, skb);
++                              exhausted = eaten = 1;
++                      }
++                      else                    /* consuming only part of the packet */
++                      {
++                              struct sk_buff *skb2 = skb_clone (skb, GFP_KERNEL);
++
++                              if (skb2 == NULL)
++                              {
++                                      if (!copied)
++                                              copied = -ENOMEM;
++                                      break;
++                              }
++
++                              dst_release (skb2->dst);
++                              __skb_pull (skb2, offset);
++                              __skb_trim (skb2, used);
++                              __skb_queue_tail (packets, skb2);
++                      }
++
++                      tp->copied_seq += used;
++                      copied += used;
++                      len -= used;
++              }
++
++              if (tp->urg_data && after(tp->copied_seq,tp->urg_seq)) {
++                      tp->urg_data = 0;
++                      tcp_fast_path_check(sk, tp);
++              }
++
++              if (!exhausted)
++                      continue;
++
++              if (skb->h.th->fin)
++              {
++                      tp->copied_seq++;
++                      if (!eaten)
++                              tcp_eat_skb (sk, skb);
++                      break;
++              }
++
++              if (!eaten)
++                      tcp_eat_skb (sk, skb);
++
++      } while (len > 0);
++
++ out:
++      /* Clean up data we have read: This will do ACK frames. */
++      cleanup_rbuf(sk, copied);
++      TCP_CHECK_TIMER(sk);
++      release_sock(sk);
++      return copied;
++}
++
+ /*
+  *    State processing on a close. This implements the state shift for
+  *    sending our FIN frame. Note that we only send a FIN for some
diff --git a/lustre/kernel_patches/patches/vmalloc_to_page-2.4.19-pre1.patch b/lustre/kernel_patches/patches/vmalloc_to_page-2.4.19-pre1.patch
new file mode 100644 (file)
index 0000000..82a7d3e
--- /dev/null
@@ -0,0 +1,43 @@
+Index: linux-2.4.19-pre1/mm/memory.c
+===================================================================
+--- linux-2.4.19-pre1.orig/mm/memory.c 2004-01-14 01:11:29.000000000 +0300
++++ linux-2.4.19-pre1/mm/memory.c      2004-01-14 01:54:44.000000000 +0300
+@@ -1470,3 +1470,25 @@
+                       len, write, 0, NULL, NULL);
+       return ret == len ? 0 : -1;
+ }
++
++struct page * vmalloc_to_page(void * vmalloc_addr)
++{
++      unsigned long addr = (unsigned long) vmalloc_addr;
++      struct page *page = NULL;
++      pmd_t *pmd;
++      pte_t *ptep, pte;
++      pgd_t *pgd;
++      
++      pgd = pgd_offset_k(addr);
++      if (!pgd_none(*pgd)) {
++              pmd = pmd_offset(pgd, addr);
++              if (!pmd_none(*pmd)) {
++                      ptep = pte_offset(pmd, addr);
++                      pte = *ptep;
++                      if (pte_present(pte)) {
++                              page = pte_page(pte);
++                      }
++              }
++      }
++      return page;
++}
+Index: linux-2.4.19-pre1/kernel/ksyms.c
+===================================================================
+--- linux-2.4.19-pre1.orig/kernel/ksyms.c      2004-01-14 01:22:28.000000000 +0300
++++ linux-2.4.19-pre1/kernel/ksyms.c   2004-01-14 01:51:55.000000000 +0300
+@@ -112,6 +112,8 @@
+ EXPORT_SYMBOL(kfree);
+ EXPORT_SYMBOL(vfree);
+ EXPORT_SYMBOL(__vmalloc);
++extern struct page * vmalloc_to_page(void *addr);
++EXPORT_SYMBOL(vmalloc_to_page);
+ EXPORT_SYMBOL(mem_map);
+ EXPORT_SYMBOL(remap_page_range);
+ EXPORT_SYMBOL(max_mapnr);
index 9551189..e3124b7 100644 (file)
@@ -22,7 +22,7 @@ ext3-san-2.4.20.patch
 ext3-map_inode_page.patch
 ext3-error-export.patch
 iopen-2.4.20.patch
-tcp-zero-copy.patch
+tcp-zero-copy-2.4.19-pre1.patch 
 jbd-dont-account-blocks-twice.patch
 jbd-commit-tricks.patch
 ext3-no-write-super.patch
@@ -44,3 +44,4 @@ kdev-2.4.19-pre1.patch
 resched-2.4.19-pre1.patch
 ext3-xattr-ptr-arith-fix.patch
 gfp_memalloc-2.4.22.patch
+vmalloc_to_page-2.4.19-pre1.patch