Setting tag linux-2.6-27-38
[linux-2.6.git] / linux-2.6-800-rename-ext4dev-to-ext4.patch
1 From: Theodore Ts'o <tytso@mit.edu>
2 Date: Sat, 11 Oct 2008 00:02:48 +0000 (-0400)
3 Subject: ext4: Rename ext4dev to ext4
4 X-Git-Tag: v2.6.28-rc1~709^2
5 X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=03010a3350301baac2154fa66de925ae2981b7e3
6
7 ext4: Rename ext4dev to ext4
8
9 The ext4 filesystem is getting stable enough that it's time to drop
10 the "dev" prefix.  Also remove the requirement for the TEST_FILESYS
11 flag.
12
13 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
14 ---
15
16 Index: linux-2.6.27.y/Documentation/filesystems/ext4.txt
17 ===================================================================
18 --- linux-2.6.27.y.orig/Documentation/filesystems/ext4.txt
19 +++ linux-2.6.27.y/Documentation/filesystems/ext4.txt
20 @@ -32,9 +32,9 @@ Mailing list: linux-ext4@vger.kernel.org
21      you will need to merge your changes with the version from e2fsprogs
22      1.41.x.
23  
24 -  - Create a new filesystem using the ext4dev filesystem type:
25 +  - Create a new filesystem using the ext4 filesystem type:
26  
27 -       # mke2fs -t ext4dev /dev/hda1
28 +       # mke2fs -t ext4 /dev/hda1
29  
30      Or configure an existing ext3 filesystem to support extents and set
31      the test_fs flag to indicate that it's ok for an in-development
32 @@ -47,13 +47,13 @@ Mailing list: linux-ext4@vger.kernel.org
33  
34          # tune2fs -I 256 /dev/hda1
35  
36 -    (Note: we currently do not have tools to convert an ext4dev
37 +    (Note: we currently do not have tools to convert an ext4
38      filesystem back to ext3; so please do not do try this on production
39      filesystems.)
40  
41    - Mounting:
42  
43 -       # mount -t ext4dev /dev/hda1 /wherever
44 +       # mount -t ext4 /dev/hda1 /wherever
45  
46    - When comparing performance with other filesystems, remember that
47      ext3/4 by default offers higher data integrity guarantees than most.
48 Index: linux-2.6.27.y/fs/Kconfig
49 ===================================================================
50 --- linux-2.6.27.y.orig/fs/Kconfig
51 +++ linux-2.6.27.y/fs/Kconfig
52 @@ -136,37 +136,51 @@ config EXT3_FS_SECURITY
53           If you are not using a security module that requires using
54           extended attributes for file security labels, say N.
55  
56 -config EXT4DEV_FS
57 -       tristate "Ext4dev/ext4 extended fs support development (EXPERIMENTAL)"
58 -       depends on EXPERIMENTAL
59 +config EXT4_FS
60 +       tristate "The Extended 4 (ext4) filesystem"
61         select JBD2
62         select CRC16
63         help
64 -         Ext4dev is a predecessor filesystem of the next generation
65 -         extended fs ext4, based on ext3 filesystem code. It will be
66 -         renamed ext4 fs later, once ext4dev is mature and stabilized.
67 +         This is the next generation of the ext3 filesystem.
68  
69           Unlike the change from ext2 filesystem to ext3 filesystem,
70 -         the on-disk format of ext4dev is not the same as ext3 any more:
71 -         it is based on extent maps and it supports 48-bit physical block
72 -         numbers. These combined on-disk format changes will allow
73 -         ext4dev/ext4 to handle more than 16 TB filesystem volumes --
74 -         a hard limit that ext3 cannot overcome without changing the
75 -         on-disk format.
76 -
77 -         Other than extent maps and 48-bit block numbers, ext4dev also is
78 -         likely to have other new features such as persistent preallocation,
79 -         high resolution time stamps, and larger file support etc.  These
80 -         features will be added to ext4dev gradually.
81 +         the on-disk format of ext4 is not forwards compatible with
82 +         ext3; it is based on extent maps and it supports 48-bit
83 +         physical block numbers.  The ext4 filesystem also supports delayed
84 +         allocation, persistent preallocation, high resolution time stamps,
85 +         and a number of other features to improve performance and speed
86 +         up fsck time.  For more information, please see the web pages at
87 +         http://ext4.wiki.kernel.org.
88 +
89 +         The ext4 filesystem will support mounting an ext3
90 +         filesystem; while there will be some performance gains from
91 +         the delayed allocation and inode table readahead, the best
92 +         performance gains will require enabling ext4 features in the
93 +         filesystem, or formating a new filesystem as an ext4
94 +         filesystem initially.
95  
96           To compile this file system support as a module, choose M here. The
97           module will be called ext4dev.
98  
99           If unsure, say N.
100  
101 -config EXT4DEV_FS_XATTR
102 -       bool "Ext4dev extended attributes"
103 -       depends on EXT4DEV_FS
104 +config EXT4DEV_COMPAT
105 +       bool "Enable ext4dev compatibility"
106 +       depends on EXT4_FS
107 +       help
108 +         Starting with 2.6.28, the name of the ext4 filesystem was
109 +         renamed from ext4dev to ext4.  Unfortunately there are some
110 +         lagecy userspace programs (such as klibc's fstype) have
111 +         "ext4dev" hardcoded.  
112 +
113 +         To enable backwards compatibility so that systems that are
114 +         still expecting to mount ext4 filesystems using ext4dev,
115 +         chose Y here.   This feature will go away by 2.6.31, so
116 +         please arrange to get your userspace programs fixed!
117 +
118 +config EXT4_FS_XATTR
119 +       bool "Ext4 extended attributes"
120 +       depends on EXT4_FS
121         default y
122         help
123           Extended attributes are name:value pairs associated with inodes by
124 @@ -175,11 +189,11 @@ config EXT4DEV_FS_XATTR
125  
126           If unsure, say N.
127  
128 -         You need this for POSIX ACL support on ext4dev/ext4.
129 +         You need this for POSIX ACL support on ext4.
130  
131 -config EXT4DEV_FS_POSIX_ACL
132 -       bool "Ext4dev POSIX Access Control Lists"
133 -       depends on EXT4DEV_FS_XATTR
134 +config EXT4_FS_POSIX_ACL
135 +       bool "Ext4 POSIX Access Control Lists"
136 +       depends on EXT4_FS_XATTR
137         select FS_POSIX_ACL
138         help
139           POSIX Access Control Lists (ACLs) support permissions for users and
140 @@ -190,14 +204,14 @@ config EXT4DEV_FS_POSIX_ACL
141  
142           If you don't know what Access Control Lists are, say N
143  
144 -config EXT4DEV_FS_SECURITY
145 -       bool "Ext4dev Security Labels"
146 -       depends on EXT4DEV_FS_XATTR
147 +config EXT4_FS_SECURITY
148 +       bool "Ext4 Security Labels"
149 +       depends on EXT4_FS_XATTR
150         help
151           Security labels support alternative access control models
152           implemented by security modules like SELinux.  This option
153           enables an extended attribute handler for file security
154 -         labels in the ext4dev/ext4 filesystem.
155 +         labels in the ext4 filesystem.
156  
157           If you are not using a security module that requires using
158           extended attributes for file security labels, say N.
159 @@ -240,22 +254,22 @@ config JBD2
160         help
161           This is a generic journaling layer for block devices that support
162           both 32-bit and 64-bit block numbers.  It is currently used by
163 -         the ext4dev/ext4 filesystem, but it could also be used to add
164 +         the ext4 filesystem, but it could also be used to add
165           journal support to other file systems or block devices such
166           as RAID or LVM.
167  
168 -         If you are using ext4dev/ext4, you need to say Y here. If you are not
169 -         using ext4dev/ext4 then you will probably want to say N.
170 +         If you are using ext4, you need to say Y here. If you are not
171 +         using ext4 then you will probably want to say N.
172  
173           To compile this device as a module, choose M here. The module will be
174 -         called jbd2.  If you are compiling ext4dev/ext4 into the kernel,
175 +         called jbd2.  If you are compiling ext4 into the kernel,
176           you cannot compile this code as a module.
177  
178  config JBD2_DEBUG
179 -       bool "JBD2 (ext4dev/ext4) debugging support"
180 +       bool "JBD2 (ext4) debugging support"
181         depends on JBD2 && DEBUG_FS
182         help
183 -         If you are using the ext4dev/ext4 journaled file system (or
184 +         If you are using the ext4 journaled file system (or
185           potentially any other filesystem/device using JBD2), this option
186           allows you to enable debugging output while the system is running,
187           in order to help track down any problems you are having.
188 @@ -270,9 +284,9 @@ config JBD2_DEBUG
189  config FS_MBCACHE
190  # Meta block cache for Extended Attributes (ext2/ext3/ext4)
191         tristate
192 -       depends on EXT2_FS_XATTR || EXT3_FS_XATTR || EXT4DEV_FS_XATTR
193 -       default y if EXT2_FS=y || EXT3_FS=y || EXT4DEV_FS=y
194 -       default m if EXT2_FS=m || EXT3_FS=m || EXT4DEV_FS=m
195 +       depends on EXT2_FS_XATTR || EXT3_FS_XATTR || EXT4_FS_XATTR
196 +       default y if EXT2_FS=y || EXT3_FS=y || EXT4_FS=y
197 +       default m if EXT2_FS=m || EXT3_FS=m || EXT4_FS=m
198  
199  config REISERFS_FS
200         tristate "Reiserfs support"
201 Index: linux-2.6.27.y/fs/Makefile
202 ===================================================================
203 --- linux-2.6.27.y.orig/fs/Makefile
204 +++ linux-2.6.27.y/fs/Makefile
205 @@ -69,7 +69,7 @@ obj-$(CONFIG_DLM)             += dlm/
206  # Do not add any filesystems before this line
207  obj-$(CONFIG_REISERFS_FS)      += reiserfs/
208  obj-$(CONFIG_EXT3_FS)          += ext3/ # Before ext2 so root fs can be ext3
209 -obj-$(CONFIG_EXT4DEV_FS)       += ext4/ # Before ext2 so root fs can be ext4dev
210 +obj-$(CONFIG_EXT4_FS)          += ext4/ # Before ext2 so root fs can be ext4dev
211  obj-$(CONFIG_JBD)              += jbd/
212  obj-$(CONFIG_JBD2)             += jbd2/
213  obj-$(CONFIG_EXT2_FS)          += ext2/
214 Index: linux-2.6.27.y/fs/ext4/Makefile
215 ===================================================================
216 --- linux-2.6.27.y.orig/fs/ext4/Makefile
217 +++ linux-2.6.27.y/fs/ext4/Makefile
218 @@ -2,12 +2,12 @@
219  # Makefile for the linux ext4-filesystem routines.
220  #
221  
222 -obj-$(CONFIG_EXT4DEV_FS) += ext4dev.o
223 +obj-$(CONFIG_EXT4_FS) += ext4.o
224  
225 -ext4dev-y      := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \
226 +ext4-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \
227                    ioctl.o namei.o super.o symlink.o hash.o resize.o extents.o \
228                    ext4_jbd2.o migrate.o mballoc.o
229  
230 -ext4dev-$(CONFIG_EXT4DEV_FS_XATTR)     += xattr.o xattr_user.o xattr_trusted.o
231 -ext4dev-$(CONFIG_EXT4DEV_FS_POSIX_ACL) += acl.o
232 -ext4dev-$(CONFIG_EXT4DEV_FS_SECURITY)  += xattr_security.o
233 +ext4-$(CONFIG_EXT4_FS_XATTR)           += xattr.o xattr_user.o xattr_trusted.o
234 +ext4-$(CONFIG_EXT4_FS_POSIX_ACL)       += acl.o
235 +ext4-$(CONFIG_EXT4_FS_SECURITY)                += xattr_security.o
236 Index: linux-2.6.27.y/fs/ext4/acl.h
237 ===================================================================
238 --- linux-2.6.27.y.orig/fs/ext4/acl.h
239 +++ linux-2.6.27.y/fs/ext4/acl.h
240 @@ -51,7 +51,7 @@ static inline int ext4_acl_count(size_t 
241         }
242  }
243  
244 -#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL
245 +#ifdef CONFIG_EXT4_FS_POSIX_ACL
246  
247  /* Value for inode->u.ext4_i.i_acl and inode->u.ext4_i.i_default_acl
248     if the ACL has not been cached */
249 @@ -62,7 +62,7 @@ extern int ext4_permission (struct inode
250  extern int ext4_acl_chmod (struct inode *);
251  extern int ext4_init_acl (handle_t *, struct inode *, struct inode *);
252  
253 -#else  /* CONFIG_EXT4DEV_FS_POSIX_ACL */
254 +#else  /* CONFIG_EXT4_FS_POSIX_ACL */
255  #include <linux/sched.h>
256  #define ext4_permission NULL
257  
258 @@ -77,5 +77,5 @@ ext4_init_acl(handle_t *handle, struct i
259  {
260         return 0;
261  }
262 -#endif  /* CONFIG_EXT4DEV_FS_POSIX_ACL */
263 +#endif  /* CONFIG_EXT4_FS_POSIX_ACL */
264  
265 Index: linux-2.6.27.y/fs/ext4/ext4_i.h
266 ===================================================================
267 --- linux-2.6.27.y.orig/fs/ext4/ext4_i.h
268 +++ linux-2.6.27.y/fs/ext4/ext4_i.h
269 @@ -101,7 +101,7 @@ struct ext4_inode_info {
270         struct ext4_block_alloc_info *i_block_alloc_info;
271  
272         ext4_lblk_t             i_dir_start_lookup;
273 -#ifdef CONFIG_EXT4DEV_FS_XATTR
274 +#ifdef CONFIG_EXT4_FS_XATTR
275         /*
276          * Extended attributes can be read independently of the main file
277          * data. Taking i_mutex even when reading would cause contention
278 @@ -111,7 +111,7 @@ struct ext4_inode_info {
279          */
280         struct rw_semaphore xattr_sem;
281  #endif
282 -#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL
283 +#ifdef CONFIG_EXT4_FS_POSIX_ACL
284         struct posix_acl        *i_acl;
285         struct posix_acl        *i_default_acl;
286  #endif
287 Index: linux-2.6.27.y/fs/ext4/file.c
288 ===================================================================
289 --- linux-2.6.27.y.orig/fs/ext4/file.c
290 +++ linux-2.6.27.y/fs/ext4/file.c
291 @@ -167,7 +167,7 @@ const struct inode_operations ext4_file_
292         .truncate       = ext4_truncate,
293         .setattr        = ext4_setattr,
294         .getattr        = ext4_getattr,
295 -#ifdef CONFIG_EXT4DEV_FS_XATTR
296 +#ifdef CONFIG_EXT4_FS_XATTR
297         .setxattr       = generic_setxattr,
298         .getxattr       = generic_getxattr,
299         .listxattr      = ext4_listxattr,
300 Index: linux-2.6.27.y/fs/ext4/inode.c
301 ===================================================================
302 --- linux-2.6.27.y.orig/fs/ext4/inode.c
303 +++ linux-2.6.27.y/fs/ext4/inode.c
304 @@ -4096,7 +4096,7 @@ struct inode *ext4_iget(struct super_blo
305                 return inode;
306  
307         ei = EXT4_I(inode);
308 -#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL
309 +#ifdef CONFIG_EXT4_FS_POSIX_ACL
310         ei->i_acl = EXT4_ACL_NOT_CACHED;
311         ei->i_default_acl = EXT4_ACL_NOT_CACHED;
312  #endif
313 Index: linux-2.6.27.y/fs/ext4/namei.c
314 ===================================================================
315 --- linux-2.6.27.y.orig/fs/ext4/namei.c
316 +++ linux-2.6.27.y/fs/ext4/namei.c
317 @@ -1797,7 +1797,7 @@ retry:
318         err = PTR_ERR(inode);
319         if (!IS_ERR(inode)) {
320                 init_special_inode(inode, inode->i_mode, rdev);
321 -#ifdef CONFIG_EXT4DEV_FS_XATTR
322 +#ifdef CONFIG_EXT4_FS_XATTR
323                 inode->i_op = &ext4_special_inode_operations;
324  #endif
325                 err = ext4_add_nondir(handle, dentry, inode);
326 @@ -2482,7 +2482,7 @@ const struct inode_operations ext4_dir_i
327         .mknod          = ext4_mknod,
328         .rename         = ext4_rename,
329         .setattr        = ext4_setattr,
330 -#ifdef CONFIG_EXT4DEV_FS_XATTR
331 +#ifdef CONFIG_EXT4_FS_XATTR
332         .setxattr       = generic_setxattr,
333         .getxattr       = generic_getxattr,
334         .listxattr      = ext4_listxattr,
335 @@ -2494,7 +2494,7 @@ const struct inode_operations ext4_dir_i
336  
337  const struct inode_operations ext4_special_inode_operations = {
338         .setattr        = ext4_setattr,
339 -#ifdef CONFIG_EXT4DEV_FS_XATTR
340 +#ifdef CONFIG_EXT4_FS_XATTR
341         .setxattr       = generic_setxattr,
342         .getxattr       = generic_getxattr,
343         .listxattr      = ext4_listxattr,
344 Index: linux-2.6.27.y/fs/ext4/super.c
345 ===================================================================
346 --- linux-2.6.27.y.orig/fs/ext4/super.c
347 +++ linux-2.6.27.y/fs/ext4/super.c
348 @@ -562,7 +562,7 @@ static struct inode *ext4_alloc_inode(st
349         ei = kmem_cache_alloc(ext4_inode_cachep, GFP_NOFS);
350         if (!ei)
351                 return NULL;
352 -#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL
353 +#ifdef CONFIG_EXT4_FS_POSIX_ACL
354         ei->i_acl = EXT4_ACL_NOT_CACHED;
355         ei->i_default_acl = EXT4_ACL_NOT_CACHED;
356  #endif
357 @@ -599,7 +599,7 @@ static void init_once(void *foo)
358         struct ext4_inode_info *ei = (struct ext4_inode_info *) foo;
359  
360         INIT_LIST_HEAD(&ei->i_orphan);
361 -#ifdef CONFIG_EXT4DEV_FS_XATTR
362 +#ifdef CONFIG_EXT4_FS_XATTR
363         init_rwsem(&ei->xattr_sem);
364  #endif
365         init_rwsem(&ei->i_data_sem);
366 @@ -626,7 +626,7 @@ static void destroy_inodecache(void)
367  static void ext4_clear_inode(struct inode *inode)
368  {
369         struct ext4_block_alloc_info *rsv = EXT4_I(inode)->i_block_alloc_info;
370 -#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL
371 +#ifdef CONFIG_EXT4_FS_POSIX_ACL
372         if (EXT4_I(inode)->i_acl &&
373                         EXT4_I(inode)->i_acl != EXT4_ACL_NOT_CACHED) {
374                 posix_acl_release(EXT4_I(inode)->i_acl);
375 @@ -718,7 +718,7 @@ static int ext4_show_options(struct seq_
376                 seq_puts(seq, ",debug");
377         if (test_opt(sb, OLDALLOC))
378                 seq_puts(seq, ",oldalloc");
379 -#ifdef CONFIG_EXT4DEV_FS_XATTR
380 +#ifdef CONFIG_EXT4_FS_XATTR
381         if (test_opt(sb, XATTR_USER) &&
382                 !(def_mount_opts & EXT4_DEFM_XATTR_USER))
383                 seq_puts(seq, ",user_xattr");
384 @@ -727,7 +727,7 @@ static int ext4_show_options(struct seq_
385                 seq_puts(seq, ",nouser_xattr");
386         }
387  #endif
388 -#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL
389 +#ifdef CONFIG_EXT4_FS_POSIX_ACL
390         if (test_opt(sb, POSIX_ACL) && !(def_mount_opts & EXT4_DEFM_ACL))
391                 seq_puts(seq, ",acl");
392         if (!test_opt(sb, POSIX_ACL) && (def_mount_opts & EXT4_DEFM_ACL))
393 @@ -1091,7 +1091,7 @@ static int parse_options(char *options, 
394                 case Opt_orlov:
395                         clear_opt(sbi->s_mount_opt, OLDALLOC);
396                         break;
397 -#ifdef CONFIG_EXT4DEV_FS_XATTR
398 +#ifdef CONFIG_EXT4_FS_XATTR
399                 case Opt_user_xattr:
400                         set_opt(sbi->s_mount_opt, XATTR_USER);
401                         break;
402 @@ -1104,7 +1104,7 @@ static int parse_options(char *options, 
403                         printk("EXT4 (no)user_xattr options not supported\n");
404                         break;
405  #endif
406 -#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL
407 +#ifdef CONFIG_EXT4_FS_POSIX_ACL
408                 case Opt_acl:
409                         set_opt(sbi->s_mount_opt, POSIX_ACL);
410                         break;
411 @@ -1992,11 +1992,11 @@ static int ext4_fill_super(struct super_
412                 set_opt(sbi->s_mount_opt, GRPID);
413         if (def_mount_opts & EXT4_DEFM_UID16)
414                 set_opt(sbi->s_mount_opt, NO_UID32);
415 -#ifdef CONFIG_EXT4DEV_FS_XATTR
416 +#ifdef CONFIG_EXT4_FS_XATTR
417         if (def_mount_opts & EXT4_DEFM_XATTR_USER)
418                 set_opt(sbi->s_mount_opt, XATTR_USER);
419  #endif
420 -#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL
421 +#ifdef CONFIG_EXT4_FS_POSIX_ACL
422         if (def_mount_opts & EXT4_DEFM_ACL)
423                 set_opt(sbi->s_mount_opt, POSIX_ACL);
424  #endif
425 @@ -2063,16 +2063,6 @@ static int ext4_fill_super(struct super_
426                        "running e2fsck is recommended\n");
427  
428         /*
429 -        * Since ext4 is still considered development code, we require
430 -        * that the TEST_FILESYS flag in s->flags be set.
431 -        */
432 -       if (!(le32_to_cpu(es->s_flags) & EXT2_FLAGS_TEST_FILESYS)) {
433 -               printk(KERN_WARNING "EXT4-fs: %s: not marked "
434 -                      "OK to use with test code.\n", sb->s_id);
435 -               goto failed_mount;
436 -       }
437 -
438 -       /*
439          * Check feature flags regardless of the revision level, since we
440          * previously didn't change the revision level when setting the flags,
441          * so there is a chance incompat flags are set on a rev 0 filesystem.
442 @@ -3567,13 +3557,34 @@ static int ext4_get_sb(struct file_syste
443         return get_sb_bdev(fs_type, flags, dev_name, data, ext4_fill_super, mnt);
444  }
445  
446 +static struct file_system_type ext4_fs_type = {
447 +       .owner          = THIS_MODULE,
448 +       .name           = "ext4",
449 +       .get_sb         = ext4_get_sb,
450 +       .kill_sb        = kill_block_super,
451 +       .fs_flags       = FS_REQUIRES_DEV,
452 +};
453 +
454 +#ifdef CONFIG_EXT4DEV_COMPAT
455 +static int ext4dev_get_sb(struct file_system_type *fs_type,
456 +       int flags, const char *dev_name, void *data, struct vfsmount *mnt)
457 +{
458 +       printk(KERN_WARNING "EXT4-fs: Update your userspace programs "
459 +              "to mount using ext4\n");
460 +       printk(KERN_WARNING "EXT4-fs: ext4dev backwards compatibility "
461 +              "will go away by 2.6.31\n");
462 +       return get_sb_bdev(fs_type, flags, dev_name, data, ext4_fill_super, mnt);
463 +}
464 +
465  static struct file_system_type ext4dev_fs_type = {
466         .owner          = THIS_MODULE,
467         .name           = "ext4dev",
468 -       .get_sb         = ext4_get_sb,
469 +       .get_sb         = ext4dev_get_sb,
470         .kill_sb        = kill_block_super,
471         .fs_flags       = FS_REQUIRES_DEV,
472  };
473 +MODULE_ALIAS("ext4dev");
474 +#endif
475  
476  static int __init init_ext4_fs(void)
477  {
478 @@ -3589,9 +3600,16 @@ static int __init init_ext4_fs(void)
479         err = init_inodecache();
480         if (err)
481                 goto out1;
482 -       err = register_filesystem(&ext4dev_fs_type);
483 +       err = register_filesystem(&ext4_fs_type);
484         if (err)
485                 goto out;
486 +#ifdef CONFIG_EXT4DEV_COMPAT
487 +       err = register_filesystem(&ext4dev_fs_type);
488 +       if (err) {
489 +               unregister_filesystem(&ext4_fs_type);
490 +               goto out;
491 +       }
492 +#endif
493         return 0;
494  out:
495         destroy_inodecache();
496 @@ -3604,7 +3622,10 @@ out2:
497  
498  static void __exit exit_ext4_fs(void)
499  {
500 +       unregister_filesystem(&ext4_fs_type);
501 +#ifdef CONFIG_EXT4DEV_COMPAT
502         unregister_filesystem(&ext4dev_fs_type);
503 +#endif
504         destroy_inodecache();
505         exit_ext4_xattr();
506         exit_ext4_mballoc();
507 Index: linux-2.6.27.y/fs/ext4/symlink.c
508 ===================================================================
509 --- linux-2.6.27.y.orig/fs/ext4/symlink.c
510 +++ linux-2.6.27.y/fs/ext4/symlink.c
511 @@ -34,7 +34,7 @@ const struct inode_operations ext4_symli
512         .readlink       = generic_readlink,
513         .follow_link    = page_follow_link_light,
514         .put_link       = page_put_link,
515 -#ifdef CONFIG_EXT4DEV_FS_XATTR
516 +#ifdef CONFIG_EXT4_FS_XATTR
517         .setxattr       = generic_setxattr,
518         .getxattr       = generic_getxattr,
519         .listxattr      = ext4_listxattr,
520 @@ -46,7 +46,7 @@ const struct inode_operations ext4_symli
521  const struct inode_operations ext4_fast_symlink_inode_operations = {
522         .readlink       = generic_readlink,
523         .follow_link    = ext4_follow_link,
524 -#ifdef CONFIG_EXT4DEV_FS_XATTR
525 +#ifdef CONFIG_EXT4_FS_XATTR
526         .setxattr       = generic_setxattr,
527         .getxattr       = generic_getxattr,
528         .listxattr      = ext4_listxattr,
529 Index: linux-2.6.27.y/fs/ext4/xattr.c
530 ===================================================================
531 --- linux-2.6.27.y.orig/fs/ext4/xattr.c
532 +++ linux-2.6.27.y/fs/ext4/xattr.c
533 @@ -100,12 +100,12 @@ static struct mb_cache *ext4_xattr_cache
534  
535  static struct xattr_handler *ext4_xattr_handler_map[] = {
536         [EXT4_XATTR_INDEX_USER]              = &ext4_xattr_user_handler,
537 -#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL
538 +#ifdef CONFIG_EXT4_FS_POSIX_ACL
539         [EXT4_XATTR_INDEX_POSIX_ACL_ACCESS]  = &ext4_xattr_acl_access_handler,
540         [EXT4_XATTR_INDEX_POSIX_ACL_DEFAULT] = &ext4_xattr_acl_default_handler,
541  #endif
542         [EXT4_XATTR_INDEX_TRUSTED]           = &ext4_xattr_trusted_handler,
543 -#ifdef CONFIG_EXT4DEV_FS_SECURITY
544 +#ifdef CONFIG_EXT4_FS_SECURITY
545         [EXT4_XATTR_INDEX_SECURITY]          = &ext4_xattr_security_handler,
546  #endif
547  };
548 @@ -113,11 +113,11 @@ static struct xattr_handler *ext4_xattr_
549  struct xattr_handler *ext4_xattr_handlers[] = {
550         &ext4_xattr_user_handler,
551         &ext4_xattr_trusted_handler,
552 -#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL
553 +#ifdef CONFIG_EXT4_FS_POSIX_ACL
554         &ext4_xattr_acl_access_handler,
555         &ext4_xattr_acl_default_handler,
556  #endif
557 -#ifdef CONFIG_EXT4DEV_FS_SECURITY
558 +#ifdef CONFIG_EXT4_FS_SECURITY
559         &ext4_xattr_security_handler,
560  #endif
561         NULL
562 Index: linux-2.6.27.y/fs/ext4/xattr.h
563 ===================================================================
564 --- linux-2.6.27.y.orig/fs/ext4/xattr.h
565 +++ linux-2.6.27.y/fs/ext4/xattr.h
566 @@ -63,7 +63,7 @@ struct ext4_xattr_entry {
567                 EXT4_I(inode)->i_extra_isize))
568  #define IFIRST(hdr) ((struct ext4_xattr_entry *)((hdr)+1))
569  
570 -# ifdef CONFIG_EXT4DEV_FS_XATTR
571 +# ifdef CONFIG_EXT4_FS_XATTR
572  
573  extern struct xattr_handler ext4_xattr_user_handler;
574  extern struct xattr_handler ext4_xattr_trusted_handler;
575 @@ -88,7 +88,7 @@ extern void exit_ext4_xattr(void);
576  
577  extern struct xattr_handler *ext4_xattr_handlers[];
578  
579 -# else  /* CONFIG_EXT4DEV_FS_XATTR */
580 +# else  /* CONFIG_EXT4_FS_XATTR */
581  
582  static inline int
583  ext4_xattr_get(struct inode *inode, int name_index, const char *name,
584 @@ -141,9 +141,9 @@ ext4_expand_extra_isize_ea(struct inode 
585  
586  #define ext4_xattr_handlers    NULL
587  
588 -# endif  /* CONFIG_EXT4DEV_FS_XATTR */
589 +# endif  /* CONFIG_EXT4_FS_XATTR */
590  
591 -#ifdef CONFIG_EXT4DEV_FS_SECURITY
592 +#ifdef CONFIG_EXT4_FS_SECURITY
593  extern int ext4_init_security(handle_t *handle, struct inode *inode,
594                                 struct inode *dir);
595  #else