Whamcloud - gitweb
- series against second suse 2.4.21 kernel
[fs/lustre-release.git] / lustre / kernel_patches / patches / linux-2.4.21-xattr-0.8.54-suse2.patch
1  Documentation/Configure.help  |   66 ++
2  arch/alpha/defconfig          |    7 
3  arch/alpha/kernel/entry.S     |   12 
4  arch/arm/defconfig            |    7 
5  arch/arm/kernel/calls.S       |   24 
6  arch/i386/defconfig           |    7 
7  arch/ia64/defconfig           |    7 
8  arch/ia64/kernel/entry.S      |   24 
9  arch/m68k/defconfig           |    7 
10  arch/mips/defconfig           |    7 
11  arch/mips64/defconfig         |    7 
12  arch/ppc/defconfig            |   14 
13  arch/ppc64/kernel/misc.S      |    2 
14  arch/s390/defconfig           |    7 
15  arch/s390/kernel/entry.S      |   24 
16  arch/s390x/defconfig          |    7 
17  arch/s390x/kernel/entry.S     |   24 
18  arch/s390x/kernel/wrapper32.S |   92 +++
19  arch/sparc/defconfig          |    7 
20  arch/sparc/kernel/systbls.S   |   10 
21  arch/sparc64/defconfig        |    7 
22  arch/sparc64/kernel/systbls.S |   20 
23  fs/Config.in                  |   14 
24  fs/Makefile                   |    3 
25  fs/ext2/Makefile              |    4 
26  fs/ext2/file.c                |    5 
27  fs/ext2/ialloc.c              |    2 
28  fs/ext2/inode.c               |   34 -
29  fs/ext2/namei.c               |   14 
30  fs/ext2/super.c               |   29 
31  fs/ext2/symlink.c             |   14 
32  fs/ext2/xattr.c               | 1212 +++++++++++++++++++++++++++++++++++++++++
33  fs/ext2/xattr_user.c          |  103 +++
34  fs/ext3/Makefile              |   10 
35  fs/ext3/file.c                |    5 
36  fs/ext3/ialloc.c              |    2 
37  fs/ext3/inode.c               |   35 -
38  fs/ext3/namei.c               |   21 
39  fs/ext3/super.c               |   36 +
40  fs/ext3/symlink.c             |   14 
41  fs/ext3/xattr.c               | 1225 ++++++++++++++++++++++++++++++++++++++++++
42  fs/ext3/xattr_user.c          |  111 +++
43  fs/jfs/jfs_xattr.h            |    6 
44  fs/jfs/xattr.c                |    6 
45  fs/mbcache.c                  |  648 ++++++++++++++++++++++
46  include/asm-arm/unistd.h      |    2 
47  include/asm-ia64/unistd.h     |   13 
48  include/asm-ppc64/unistd.h    |    2 
49  include/asm-s390/unistd.h     |   15 
50  include/asm-s390x/unistd.h    |   15 
51  include/asm-sparc/unistd.h    |   24 
52  include/asm-sparc64/unistd.h  |   24 
53  include/linux/cache_def.h     |   15 
54  include/linux/errno.h         |    4 
55  include/linux/ext2_fs.h       |   31 -
56  include/linux/ext2_xattr.h    |  157 +++++
57  include/linux/ext3_fs.h       |   31 -
58  include/linux/ext3_jbd.h      |    8 
59  include/linux/ext3_xattr.h    |  157 +++++
60  include/linux/fs.h            |    2 
61  include/linux/mbcache.h       |   69 ++
62  kernel/ksyms.c                |    4 
63  mm/vmscan.c                   |   35 +
64  fs/ext3/ext3-exports.c        |   14 +  
65  64 files changed, 4355 insertions(+), 195 deletions(-)
66
67 Index: linux-2.4.21-chaos/Documentation/Configure.help
68 ===================================================================
69 --- linux-2.4.21-chaos.orig/Documentation/Configure.help        2003-10-04 01:18:57.000000000 +0400
70 +++ linux-2.4.21-chaos/Documentation/Configure.help     2003-12-14 15:11:46.000000000 +0300
71 @@ -16008,6 +16041,39 @@
72  
73    If unsure, say N.
74  
75 +Ext3 extended attributes
76 +CONFIG_EXT3_FS_XATTR
77 +  Extended attributes are name:value pairs associated with inodes by
78 +  the kernel or by users (see the attr(5) manual page, or visit
79 +  <http://acl.bestbits.at/> for details).
80 +
81 +  If unsure, say N.
82 +
83 +Ext3 extended attribute block sharing
84 +CONFIG_EXT3_FS_XATTR_SHARING
85 +  This options enables code for sharing identical extended attribute
86 +  blocks among multiple inodes.
87 +
88 +  Usually, say Y.
89 +
90 +Ext3 extended user attributes
91 +CONFIG_EXT3_FS_XATTR_USER
92 +  This option enables extended user attributes on ext3. Processes can
93 +  associate extended user attributes with inodes to store additional
94 +  information such as the character encoding of files, etc. (see the
95 +  attr(5) manual page, or visit <http://acl.bestbits.at/> for details).
96 +
97 +  If unsure, say N.
98 +
99 +Ext3 trusted extended attributes
100 +CONFIG_EXT3_FS_XATTR_TRUSTED
101 +  This option enables extended attributes on ext3 that are accessible
102 +  (and visible) only to users capable of CAP_SYS_ADMIN. Usually this
103 +  is only the super user. Trusted extended attributes are meant for
104 +  implementing system/security services.
105 +
106 +  If unsure, say N.
107 +
108  Journal Block Device support (JBD for ext3) (EXPERIMENTAL)
109  CONFIG_JBD
110    This is a generic journalling layer for block devices.  It is
111 Index: linux-2.4.21-chaos/fs/ext3/Makefile
112 ===================================================================
113 --- linux-2.4.21-chaos.orig/fs/ext3/Makefile    2003-12-14 15:09:30.000000000 +0300
114 +++ linux-2.4.21-chaos/fs/ext3/Makefile 2003-12-14 15:11:46.000000000 +0300
115 @@ -9,10 +9,10 @@
116  
117  O_TARGET := ext3.o
118  
119 -export-objs := super.o inode.o
120 +export-objs := ext3-exports.o
121  
122  obj-y    := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \
123 -               ioctl.o namei.o super.o symlink.o hash.o
124 +               ioctl.o namei.o super.o symlink.o hash.o ext3-exports.o
125  obj-m    := $(O_TARGET)
126  
127  export-objs += xattr.o
128 Index: linux-2.4.21-chaos/fs/ext3/super.c
129 ===================================================================
130 --- linux-2.4.21-chaos.orig/fs/ext3/super.c     2003-12-14 15:09:30.000000000 +0300
131 +++ linux-2.4.21-chaos/fs/ext3/super.c  2003-12-14 15:11:46.000000000 +0300
132 @@ -1944,9 +1944,6 @@
133         unregister_filesystem(&ext3_fs_type);
134  }
135  
136 -EXPORT_SYMBOL(ext3_force_commit);
137 -EXPORT_SYMBOL(ext3_bread);
138 -
139  MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others");
140  MODULE_DESCRIPTION("Second Extended Filesystem with journaling extensions");
141  MODULE_LICENSE("GPL");
142 Index: linux-2.4.21-chaos/fs/ext3/ext3-exports.c
143 ===================================================================
144 --- linux-2.4.21-chaos.orig/fs/ext3/ext3-exports.c      2003-01-30 13:24:37.000000000 +0300
145 +++ linux-2.4.21-chaos/fs/ext3/ext3-exports.c   2003-12-14 15:11:46.000000000 +0300
146 @@ -0,0 +1,14 @@
147 +#include <linux/config.h>
148 +#include <linux/module.h>
149 +#include <linux/ext3_fs.h>
150 +#include <linux/ext3_jbd.h>
151 +#include <linux/ext3_xattr.h>
152 +
153 +EXPORT_SYMBOL(ext3_force_commit);
154 +EXPORT_SYMBOL(ext3_bread);
155 +EXPORT_SYMBOL(ext3_journal_abort_handle);
156 +EXPORT_SYMBOL(ext3_xattr_register);
157 +EXPORT_SYMBOL(ext3_xattr_unregister);
158 +EXPORT_SYMBOL(ext3_xattr_get);
159 +EXPORT_SYMBOL(ext3_xattr_list);
160 +EXPORT_SYMBOL(ext3_xattr_set);
161 Index: linux-2.4.21-chaos/fs/ext3/xattr_trusted.c
162 ===================================================================
163 --- linux-2.4.21-chaos.orig/fs/ext3/xattr_trusted.c     2003-07-15 04:41:01.000000000 +0400
164 +++ linux-2.4.21-chaos/fs/ext3/xattr_trusted.c  2003-12-14 15:11:46.000000000 +0300
165 @@ -50,7 +50,7 @@
166                 return -EINVAL;
167         if (!capable(CAP_SYS_ADMIN))
168                 return -EPERM;
169 -       return ext3_xattr_set(inode, EXT3_XATTR_INDEX_TRUSTED, name,
170 +       return ext3_xattr_set_trans(inode, EXT3_XATTR_INDEX_TRUSTED, name,
171                               value, size, flags);
172  }
173  
174 Index: linux-2.4.21-chaos/fs/ext3/xattr.c
175 ===================================================================
176 --- linux-2.4.21-chaos.orig/fs/ext3/xattr.c     2003-07-30 04:11:55.000000000 +0400
177 +++ linux-2.4.21-chaos/fs/ext3/xattr.c  2003-12-14 15:11:46.000000000 +0300
178 @@ -868,7 +868,7 @@
179  }
180  
181  /*
182 - * ext3_xattr_set()
183 + * ext3_xattr_set_trans()
184   *
185   * Like ext3_xattr_set_handle, but start from an inode. This extended
186   * attribute modification is a filesystem transaction by itself.
187 @@ -876,7 +876,7 @@
188   * Returns 0, or a negative error number on failure.
189   */
190  int
191 -ext3_xattr_set(struct inode *inode, int name_index, const char *name,
192 +ext3_xattr_set_trans(struct inode *inode, int name_index, const char *name,
193                 const void *value, size_t value_len, int flags)
194  {
195         handle_t *handle;
196 @@ -895,6 +895,20 @@
197         return error ? error : error2;
198  }
199  
200 +int
201 +ext3_xattr_set(handle_t *handle, struct inode *inode, int name_index,
202 +               const char *name, const void *value, size_t value_len,
203 +               int flags)
204 +{
205 +       int error;
206 +
207 +       lock_kernel();
208 +       error = ext3_xattr_set_handle(handle, inode, name_index, name,
209 +                                             value, value_len, flags);
210 +       unlock_kernel();
211 +       return error;
212 +}
213 +
214  /*
215   * ext3_xattr_delete_inode()
216   *
217 Index: linux-2.4.21-chaos/fs/ext3/xattr_user.c
218 ===================================================================
219 --- linux-2.4.21-chaos.orig/fs/ext3/xattr_user.c        2003-07-30 04:11:55.000000000 +0400
220 +++ linux-2.4.21-chaos/fs/ext3/xattr_user.c     2003-12-14 15:26:58.000000000 +0300
221 @@ -70,7 +70,7 @@
222         if (error)
223                 return error;
224    
225 -       return ext3_xattr_set(inode, EXT3_XATTR_INDEX_USER, name,
226 +       return ext3_xattr_set_trans(inode, EXT3_XATTR_INDEX_USER, name,
227                               value, size, flags);
228  }
229  
230 Index: linux-2.4.21-chaos/include/linux/errno.h
231 ===================================================================
232 --- linux-2.4.21-chaos.orig/include/linux/errno.h       2003-07-15 04:41:12.000000000 +0400
233 +++ linux-2.4.21-chaos/include/linux/errno.h    2003-12-14 15:11:46.000000000 +0300
234 @@ -26,4 +26,8 @@
235  
236  #endif
237  
238 +/* Defined for extended attributes */
239 +#define ENOATTR ENODATA                /* No such attribute */
240 +#define ENOTSUP EOPNOTSUPP     /* Operation not supported */
241 +
242  #endif
243 Index: linux-2.4.21-chaos/include/linux/ext3_xattr.h
244 ===================================================================
245 --- linux-2.4.21-chaos.orig/include/linux/ext3_xattr.h  2003-12-05 16:54:33.000000000 +0300
246 +++ linux-2.4.21-chaos/include/linux/ext3_xattr.h       2003-12-14 15:21:13.000000000 +0300
247 @@ -82,8 +82,10 @@
248  extern int ext3_xattr_list(struct inode *, char *, size_t);
249  extern int ext3_xattr_set_handle(handle_t *handle, struct inode *, int,
250                                  const char *, const void *, size_t, int);
251 -extern int ext3_xattr_set(struct inode *, int, const char *, const void *,
252 +extern int ext3_xattr_set_trans(struct inode *, int, const char *, const void *,
253                           size_t, int);
254 +extern int ext3_xattr_set(handle_t *, struct inode *, int, const char *,
255 +                               const void *, size_t, int);
256  
257  extern void ext3_xattr_delete_inode(handle_t *, struct inode *);
258  extern void ext3_xattr_put_super(struct super_block *);