Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / kernel_patches / patches / linux-2.4.21-xattr-0.8.54-suse-171.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-241/Documentation/Configure.help
68 ===================================================================
69 --- linux-2.4.21-241.orig/Documentation/Configure.help  2004-10-03 17:37:47.000000000 -0400
70 +++ linux-2.4.21-241/Documentation/Configure.help       2004-10-04 02:19:55.000000000 -0400
71 @@ -16421,6 +16421,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-241/fs/ext3/Makefile
112 ===================================================================
113 --- linux-2.4.21-241.orig/fs/ext3/Makefile      2004-10-04 02:19:51.000000000 -0400
114 +++ linux-2.4.21-241/fs/ext3/Makefile   2004-10-04 02:19:55.000000000 -0400
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-241/fs/ext3/super.c
129 ===================================================================
130 --- linux-2.4.21-241.orig/fs/ext3/super.c       2004-10-04 02:19:51.000000000 -0400
131 +++ linux-2.4.21-241/fs/ext3/super.c    2004-10-04 02:19:55.000000000 -0400
132 @@ -1914,9 +1914,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-241/fs/ext3/ext3-exports.c
143 ===================================================================
144 --- linux-2.4.21-241.orig/fs/ext3/ext3-exports.c        1969-12-31 19:00:00.000000000 -0500
145 +++ linux-2.4.21-241/fs/ext3/ext3-exports.c     2004-10-04 02:19:55.000000000 -0400
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-241/fs/ext3/xattr_trusted.c
162 ===================================================================
163 --- linux-2.4.21-241.orig/fs/ext3/xattr_trusted.c       2004-10-03 17:37:47.000000000 -0400
164 +++ linux-2.4.21-241/fs/ext3/xattr_trusted.c    2004-10-04 02:19:55.000000000 -0400
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-241/fs/ext3/xattr.c
175 ===================================================================
176 --- linux-2.4.21-241.orig/fs/ext3/xattr.c       2004-10-03 17:37:47.000000000 -0400
177 +++ linux-2.4.21-241/fs/ext3/xattr.c    2004-10-04 02:23:13.000000000 -0400
178 @@ -785,7 +785,7 @@
179                         * don't need to change the reference count. */
180                         new_bh = old_bh;
181                         get_bh(new_bh);
182 -                       ext3_xattr_cache_insert(new_bh);
183 +                       (void)ext3_xattr_cache_insert(new_bh);
184                 } else {
185                         /* We need to allocate a new block */
186                         int goal = le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->
187 @@ -814,7 +814,7 @@
188                         memcpy(new_bh->b_data, header, new_bh->b_size);
189                         mark_buffer_uptodate(new_bh, 1);
190                         unlock_buffer(new_bh);
191 -                       ext3_xattr_cache_insert(new_bh);
192 +                       (void)ext3_xattr_cache_insert(new_bh);
193                         
194                         ext3_xattr_update_super_block(handle, sb);
195                 }
196 @@ -870,7 +870,7 @@
197  }
198  
199  /*
200 - * ext3_xattr_set()
201 + * ext3_xattr_set_trans()
202   *
203   * Like ext3_xattr_set_handle, but start from an inode. This extended
204   * attribute modification is a filesystem transaction by itself.
205 @@ -878,7 +878,7 @@
206   * Returns 0, or a negative error number on failure.
207   */
208  int
209 -ext3_xattr_set(struct inode *inode, int name_index, const char *name,
210 +ext3_xattr_set_trans(struct inode *inode, int name_index, const char *name,
211                 const void *value, size_t value_len, int flags)
212  {
213         handle_t *handle;
214 @@ -900,6 +900,20 @@
215         return error;
216  }
217  
218 +int
219 +ext3_xattr_set(handle_t *handle, struct inode *inode, int name_index,
220 +               const char *name, const void *value, size_t value_len,
221 +               int flags)
222 +{
223 +       int error;
224 +
225 +       lock_kernel();
226 +       error = ext3_xattr_set_handle(handle, inode, name_index, name,
227 +                                             value, value_len, flags);
228 +       unlock_kernel();
229 +       return error;
230 +}
231 +
232  /*
233   * ext3_xattr_delete_inode()
234   *
235 Index: linux-2.4.21-241/fs/ext3/xattr_user.c
236 ===================================================================
237 --- linux-2.4.21-241.orig/fs/ext3/xattr_user.c  2004-10-03 17:37:47.000000000 -0400
238 +++ linux-2.4.21-241/fs/ext3/xattr_user.c       2004-10-04 02:19:55.000000000 -0400
239 @@ -70,7 +70,7 @@
240         if (error)
241                 return error;
242    
243 -       return ext3_xattr_set(inode, EXT3_XATTR_INDEX_USER, name,
244 +       return ext3_xattr_set_trans(inode, EXT3_XATTR_INDEX_USER, name,
245                               value, size, flags);
246  }
247  
248 Index: linux-2.4.21-241/include/linux/errno.h
249 ===================================================================
250 --- linux-2.4.21-241.orig/include/linux/errno.h 2004-10-03 17:37:47.000000000 -0400
251 +++ linux-2.4.21-241/include/linux/errno.h      2004-10-04 02:19:55.000000000 -0400
252 @@ -26,4 +26,8 @@
253  
254  #endif
255  
256 +/* Defined for extended attributes */
257 +#define ENOATTR ENODATA                /* No such attribute */
258 +#define ENOTSUP EOPNOTSUPP     /* Operation not supported */
259 +
260  #endif
261 Index: linux-2.4.21-241/include/linux/ext3_xattr.h
262 ===================================================================
263 --- linux-2.4.21-241.orig/include/linux/ext3_xattr.h    2004-10-03 17:37:47.000000000 -0400
264 +++ linux-2.4.21-241/include/linux/ext3_xattr.h 2004-10-04 02:19:55.000000000 -0400
265 @@ -80,8 +80,10 @@
266  extern int ext3_xattr_list(struct inode *, char *, size_t);
267  extern int ext3_xattr_set_handle(handle_t *handle, struct inode *, int,
268                                  const char *, const void *, size_t, int);
269 -extern int ext3_xattr_set(struct inode *, int, const char *, const void *,
270 +extern int ext3_xattr_set_trans(struct inode *, int, const char *, const void *,
271                           size_t, int);
272 +extern int ext3_xattr_set(handle_t *, struct inode *, int, const char *,
273 +                               const void *, size_t, int);
274  
275  extern void ext3_xattr_delete_inode(handle_t *, struct inode *);
276  extern void ext3_xattr_put_super(struct super_block *);