Commit 03010a3350301baac2154fa66de925ae2981b7e3
1 parent
39d80c33a0
Exists in
master
and in
4 other branches
ext4: Rename ext4dev to ext4
The ext4 filesystem is getting stable enough that it's time to drop the "dev" prefix. Also remove the requirement for the TEST_FILESYS flag. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Showing 13 changed files with 123 additions and 88 deletions Side-by-side Diff
Documentation/filesystems/ext4.txt
... | ... | @@ -32,9 +32,9 @@ |
32 | 32 | you will need to merge your changes with the version from e2fsprogs |
33 | 33 | 1.41.x. |
34 | 34 | |
35 | - - Create a new filesystem using the ext4dev filesystem type: | |
35 | + - Create a new filesystem using the ext4 filesystem type: | |
36 | 36 | |
37 | - # mke2fs -t ext4dev /dev/hda1 | |
37 | + # mke2fs -t ext4 /dev/hda1 | |
38 | 38 | |
39 | 39 | Or configure an existing ext3 filesystem to support extents and set |
40 | 40 | the test_fs flag to indicate that it's ok for an in-development |
41 | 41 | |
... | ... | @@ -47,13 +47,13 @@ |
47 | 47 | |
48 | 48 | # tune2fs -I 256 /dev/hda1 |
49 | 49 | |
50 | - (Note: we currently do not have tools to convert an ext4dev | |
50 | + (Note: we currently do not have tools to convert an ext4 | |
51 | 51 | filesystem back to ext3; so please do not do try this on production |
52 | 52 | filesystems.) |
53 | 53 | |
54 | 54 | - Mounting: |
55 | 55 | |
56 | - # mount -t ext4dev /dev/hda1 /wherever | |
56 | + # mount -t ext4 /dev/hda1 /wherever | |
57 | 57 | |
58 | 58 | - When comparing performance with other filesystems, remember that |
59 | 59 | ext3/4 by default offers higher data integrity guarantees than most. |
fs/Kconfig
... | ... | @@ -136,37 +136,51 @@ |
136 | 136 | If you are not using a security module that requires using |
137 | 137 | extended attributes for file security labels, say N. |
138 | 138 | |
139 | -config EXT4DEV_FS | |
140 | - tristate "Ext4dev/ext4 extended fs support development (EXPERIMENTAL)" | |
141 | - depends on EXPERIMENTAL | |
139 | +config EXT4_FS | |
140 | + tristate "The Extended 4 (ext4) filesystem" | |
142 | 141 | select JBD2 |
143 | 142 | select CRC16 |
144 | 143 | help |
145 | - Ext4dev is a predecessor filesystem of the next generation | |
146 | - extended fs ext4, based on ext3 filesystem code. It will be | |
147 | - renamed ext4 fs later, once ext4dev is mature and stabilized. | |
144 | + This is the next generation of the ext3 filesystem. | |
148 | 145 | |
149 | 146 | Unlike the change from ext2 filesystem to ext3 filesystem, |
150 | - the on-disk format of ext4dev is not the same as ext3 any more: | |
151 | - it is based on extent maps and it supports 48-bit physical block | |
152 | - numbers. These combined on-disk format changes will allow | |
153 | - ext4dev/ext4 to handle more than 16 TB filesystem volumes -- | |
154 | - a hard limit that ext3 cannot overcome without changing the | |
155 | - on-disk format. | |
147 | + the on-disk format of ext4 is not forwards compatible with | |
148 | + ext3; it is based on extent maps and it supports 48-bit | |
149 | + physical block numbers. The ext4 filesystem also supports delayed | |
150 | + allocation, persistent preallocation, high resolution time stamps, | |
151 | + and a number of other features to improve performance and speed | |
152 | + up fsck time. For more information, please see the web pages at | |
153 | + http://ext4.wiki.kernel.org. | |
156 | 154 | |
157 | - Other than extent maps and 48-bit block numbers, ext4dev also is | |
158 | - likely to have other new features such as persistent preallocation, | |
159 | - high resolution time stamps, and larger file support etc. These | |
160 | - features will be added to ext4dev gradually. | |
155 | + The ext4 filesystem will support mounting an ext3 | |
156 | + filesystem; while there will be some performance gains from | |
157 | + the delayed allocation and inode table readahead, the best | |
158 | + performance gains will require enabling ext4 features in the | |
159 | + filesystem, or formating a new filesystem as an ext4 | |
160 | + filesystem initially. | |
161 | 161 | |
162 | 162 | To compile this file system support as a module, choose M here. The |
163 | 163 | module will be called ext4dev. |
164 | 164 | |
165 | 165 | If unsure, say N. |
166 | 166 | |
167 | -config EXT4DEV_FS_XATTR | |
168 | - bool "Ext4dev extended attributes" | |
169 | - depends on EXT4DEV_FS | |
167 | +config EXT4DEV_COMPAT | |
168 | + bool "Enable ext4dev compatibility" | |
169 | + depends on EXT4_FS | |
170 | + help | |
171 | + Starting with 2.6.28, the name of the ext4 filesystem was | |
172 | + renamed from ext4dev to ext4. Unfortunately there are some | |
173 | + lagecy userspace programs (such as klibc's fstype) have | |
174 | + "ext4dev" hardcoded. | |
175 | + | |
176 | + To enable backwards compatibility so that systems that are | |
177 | + still expecting to mount ext4 filesystems using ext4dev, | |
178 | + chose Y here. This feature will go away by 2.6.31, so | |
179 | + please arrange to get your userspace programs fixed! | |
180 | + | |
181 | +config EXT4_FS_XATTR | |
182 | + bool "Ext4 extended attributes" | |
183 | + depends on EXT4_FS | |
170 | 184 | default y |
171 | 185 | help |
172 | 186 | Extended attributes are name:value pairs associated with inodes by |
173 | 187 | |
... | ... | @@ -175,11 +189,11 @@ |
175 | 189 | |
176 | 190 | If unsure, say N. |
177 | 191 | |
178 | - You need this for POSIX ACL support on ext4dev/ext4. | |
192 | + You need this for POSIX ACL support on ext4. | |
179 | 193 | |
180 | -config EXT4DEV_FS_POSIX_ACL | |
181 | - bool "Ext4dev POSIX Access Control Lists" | |
182 | - depends on EXT4DEV_FS_XATTR | |
194 | +config EXT4_FS_POSIX_ACL | |
195 | + bool "Ext4 POSIX Access Control Lists" | |
196 | + depends on EXT4_FS_XATTR | |
183 | 197 | select FS_POSIX_ACL |
184 | 198 | help |
185 | 199 | POSIX Access Control Lists (ACLs) support permissions for users and |
186 | 200 | |
... | ... | @@ -190,14 +204,14 @@ |
190 | 204 | |
191 | 205 | If you don't know what Access Control Lists are, say N |
192 | 206 | |
193 | -config EXT4DEV_FS_SECURITY | |
194 | - bool "Ext4dev Security Labels" | |
195 | - depends on EXT4DEV_FS_XATTR | |
207 | +config EXT4_FS_SECURITY | |
208 | + bool "Ext4 Security Labels" | |
209 | + depends on EXT4_FS_XATTR | |
196 | 210 | help |
197 | 211 | Security labels support alternative access control models |
198 | 212 | implemented by security modules like SELinux. This option |
199 | 213 | enables an extended attribute handler for file security |
200 | - labels in the ext4dev/ext4 filesystem. | |
214 | + labels in the ext4 filesystem. | |
201 | 215 | |
202 | 216 | If you are not using a security module that requires using |
203 | 217 | extended attributes for file security labels, say N. |
204 | 218 | |
205 | 219 | |
206 | 220 | |
207 | 221 | |
... | ... | @@ -240,22 +254,22 @@ |
240 | 254 | help |
241 | 255 | This is a generic journaling layer for block devices that support |
242 | 256 | both 32-bit and 64-bit block numbers. It is currently used by |
243 | - the ext4dev/ext4 filesystem, but it could also be used to add | |
257 | + the ext4 filesystem, but it could also be used to add | |
244 | 258 | journal support to other file systems or block devices such |
245 | 259 | as RAID or LVM. |
246 | 260 | |
247 | - If you are using ext4dev/ext4, you need to say Y here. If you are not | |
248 | - using ext4dev/ext4 then you will probably want to say N. | |
261 | + If you are using ext4, you need to say Y here. If you are not | |
262 | + using ext4 then you will probably want to say N. | |
249 | 263 | |
250 | 264 | To compile this device as a module, choose M here. The module will be |
251 | - called jbd2. If you are compiling ext4dev/ext4 into the kernel, | |
265 | + called jbd2. If you are compiling ext4 into the kernel, | |
252 | 266 | you cannot compile this code as a module. |
253 | 267 | |
254 | 268 | config JBD2_DEBUG |
255 | - bool "JBD2 (ext4dev/ext4) debugging support" | |
269 | + bool "JBD2 (ext4) debugging support" | |
256 | 270 | depends on JBD2 && DEBUG_FS |
257 | 271 | help |
258 | - If you are using the ext4dev/ext4 journaled file system (or | |
272 | + If you are using the ext4 journaled file system (or | |
259 | 273 | potentially any other filesystem/device using JBD2), this option |
260 | 274 | allows you to enable debugging output while the system is running, |
261 | 275 | in order to help track down any problems you are having. |
... | ... | @@ -270,9 +284,9 @@ |
270 | 284 | config FS_MBCACHE |
271 | 285 | # Meta block cache for Extended Attributes (ext2/ext3/ext4) |
272 | 286 | tristate |
273 | - depends on EXT2_FS_XATTR || EXT3_FS_XATTR || EXT4DEV_FS_XATTR | |
274 | - default y if EXT2_FS=y || EXT3_FS=y || EXT4DEV_FS=y | |
275 | - default m if EXT2_FS=m || EXT3_FS=m || EXT4DEV_FS=m | |
287 | + depends on EXT2_FS_XATTR || EXT3_FS_XATTR || EXT4_FS_XATTR | |
288 | + default y if EXT2_FS=y || EXT3_FS=y || EXT4_FS=y | |
289 | + default m if EXT2_FS=m || EXT3_FS=m || EXT4_FS=m | |
276 | 290 | |
277 | 291 | config REISERFS_FS |
278 | 292 | tristate "Reiserfs support" |
fs/Makefile
... | ... | @@ -69,7 +69,7 @@ |
69 | 69 | # Do not add any filesystems before this line |
70 | 70 | obj-$(CONFIG_REISERFS_FS) += reiserfs/ |
71 | 71 | obj-$(CONFIG_EXT3_FS) += ext3/ # Before ext2 so root fs can be ext3 |
72 | -obj-$(CONFIG_EXT4DEV_FS) += ext4/ # Before ext2 so root fs can be ext4dev | |
72 | +obj-$(CONFIG_EXT4_FS) += ext4/ # Before ext2 so root fs can be ext4dev | |
73 | 73 | obj-$(CONFIG_JBD) += jbd/ |
74 | 74 | obj-$(CONFIG_JBD2) += jbd2/ |
75 | 75 | obj-$(CONFIG_EXT2_FS) += ext2/ |
fs/ext4/Makefile
... | ... | @@ -2,13 +2,13 @@ |
2 | 2 | # Makefile for the linux ext4-filesystem routines. |
3 | 3 | # |
4 | 4 | |
5 | -obj-$(CONFIG_EXT4DEV_FS) += ext4dev.o | |
5 | +obj-$(CONFIG_EXT4_FS) += ext4.o | |
6 | 6 | |
7 | -ext4dev-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \ | |
7 | +ext4-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \ | |
8 | 8 | ioctl.o namei.o super.o symlink.o hash.o resize.o extents.o \ |
9 | 9 | ext4_jbd2.o migrate.o mballoc.o |
10 | 10 | |
11 | -ext4dev-$(CONFIG_EXT4DEV_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o | |
12 | -ext4dev-$(CONFIG_EXT4DEV_FS_POSIX_ACL) += acl.o | |
13 | -ext4dev-$(CONFIG_EXT4DEV_FS_SECURITY) += xattr_security.o | |
11 | +ext4-$(CONFIG_EXT4_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o | |
12 | +ext4-$(CONFIG_EXT4_FS_POSIX_ACL) += acl.o | |
13 | +ext4-$(CONFIG_EXT4_FS_SECURITY) += xattr_security.o |
fs/ext4/acl.h
... | ... | @@ -51,7 +51,7 @@ |
51 | 51 | } |
52 | 52 | } |
53 | 53 | |
54 | -#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL | |
54 | +#ifdef CONFIG_EXT4_FS_POSIX_ACL | |
55 | 55 | |
56 | 56 | /* Value for inode->u.ext4_i.i_acl and inode->u.ext4_i.i_default_acl |
57 | 57 | if the ACL has not been cached */ |
... | ... | @@ -62,7 +62,7 @@ |
62 | 62 | extern int ext4_acl_chmod(struct inode *); |
63 | 63 | extern int ext4_init_acl(handle_t *, struct inode *, struct inode *); |
64 | 64 | |
65 | -#else /* CONFIG_EXT4DEV_FS_POSIX_ACL */ | |
65 | +#else /* CONFIG_EXT4_FS_POSIX_ACL */ | |
66 | 66 | #include <linux/sched.h> |
67 | 67 | #define ext4_permission NULL |
68 | 68 | |
... | ... | @@ -77,5 +77,5 @@ |
77 | 77 | { |
78 | 78 | return 0; |
79 | 79 | } |
80 | -#endif /* CONFIG_EXT4DEV_FS_POSIX_ACL */ | |
80 | +#endif /* CONFIG_EXT4_FS_POSIX_ACL */ |
fs/ext4/ext4_i.h
... | ... | @@ -66,7 +66,7 @@ |
66 | 66 | __u32 i_state; /* Dynamic state flags for ext4 */ |
67 | 67 | |
68 | 68 | ext4_lblk_t i_dir_start_lookup; |
69 | -#ifdef CONFIG_EXT4DEV_FS_XATTR | |
69 | +#ifdef CONFIG_EXT4_FS_XATTR | |
70 | 70 | /* |
71 | 71 | * Extended attributes can be read independently of the main file |
72 | 72 | * data. Taking i_mutex even when reading would cause contention |
... | ... | @@ -76,7 +76,7 @@ |
76 | 76 | */ |
77 | 77 | struct rw_semaphore xattr_sem; |
78 | 78 | #endif |
79 | -#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL | |
79 | +#ifdef CONFIG_EXT4_FS_POSIX_ACL | |
80 | 80 | struct posix_acl *i_acl; |
81 | 81 | struct posix_acl *i_default_acl; |
82 | 82 | #endif |
fs/ext4/file.c
... | ... | @@ -165,7 +165,7 @@ |
165 | 165 | .truncate = ext4_truncate, |
166 | 166 | .setattr = ext4_setattr, |
167 | 167 | .getattr = ext4_getattr, |
168 | -#ifdef CONFIG_EXT4DEV_FS_XATTR | |
168 | +#ifdef CONFIG_EXT4_FS_XATTR | |
169 | 169 | .setxattr = generic_setxattr, |
170 | 170 | .getxattr = generic_getxattr, |
171 | 171 | .listxattr = ext4_listxattr, |
fs/ext4/inode.c
fs/ext4/namei.c
... | ... | @@ -1773,7 +1773,7 @@ |
1773 | 1773 | err = PTR_ERR(inode); |
1774 | 1774 | if (!IS_ERR(inode)) { |
1775 | 1775 | init_special_inode(inode, inode->i_mode, rdev); |
1776 | -#ifdef CONFIG_EXT4DEV_FS_XATTR | |
1776 | +#ifdef CONFIG_EXT4_FS_XATTR | |
1777 | 1777 | inode->i_op = &ext4_special_inode_operations; |
1778 | 1778 | #endif |
1779 | 1779 | err = ext4_add_nondir(handle, dentry, inode); |
... | ... | @@ -2456,7 +2456,7 @@ |
2456 | 2456 | .mknod = ext4_mknod, |
2457 | 2457 | .rename = ext4_rename, |
2458 | 2458 | .setattr = ext4_setattr, |
2459 | -#ifdef CONFIG_EXT4DEV_FS_XATTR | |
2459 | +#ifdef CONFIG_EXT4_FS_XATTR | |
2460 | 2460 | .setxattr = generic_setxattr, |
2461 | 2461 | .getxattr = generic_getxattr, |
2462 | 2462 | .listxattr = ext4_listxattr, |
... | ... | @@ -2467,7 +2467,7 @@ |
2467 | 2467 | |
2468 | 2468 | const struct inode_operations ext4_special_inode_operations = { |
2469 | 2469 | .setattr = ext4_setattr, |
2470 | -#ifdef CONFIG_EXT4DEV_FS_XATTR | |
2470 | +#ifdef CONFIG_EXT4_FS_XATTR | |
2471 | 2471 | .setxattr = generic_setxattr, |
2472 | 2472 | .getxattr = generic_getxattr, |
2473 | 2473 | .listxattr = ext4_listxattr, |
fs/ext4/super.c
... | ... | @@ -569,7 +569,7 @@ |
569 | 569 | ei = kmem_cache_alloc(ext4_inode_cachep, GFP_NOFS); |
570 | 570 | if (!ei) |
571 | 571 | return NULL; |
572 | -#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL | |
572 | +#ifdef CONFIG_EXT4_FS_POSIX_ACL | |
573 | 573 | ei->i_acl = EXT4_ACL_NOT_CACHED; |
574 | 574 | ei->i_default_acl = EXT4_ACL_NOT_CACHED; |
575 | 575 | #endif |
... | ... | @@ -605,7 +605,7 @@ |
605 | 605 | struct ext4_inode_info *ei = (struct ext4_inode_info *) foo; |
606 | 606 | |
607 | 607 | INIT_LIST_HEAD(&ei->i_orphan); |
608 | -#ifdef CONFIG_EXT4DEV_FS_XATTR | |
608 | +#ifdef CONFIG_EXT4_FS_XATTR | |
609 | 609 | init_rwsem(&ei->xattr_sem); |
610 | 610 | #endif |
611 | 611 | init_rwsem(&ei->i_data_sem); |
... | ... | @@ -631,7 +631,7 @@ |
631 | 631 | |
632 | 632 | static void ext4_clear_inode(struct inode *inode) |
633 | 633 | { |
634 | -#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL | |
634 | +#ifdef CONFIG_EXT4_FS_POSIX_ACL | |
635 | 635 | if (EXT4_I(inode)->i_acl && |
636 | 636 | EXT4_I(inode)->i_acl != EXT4_ACL_NOT_CACHED) { |
637 | 637 | posix_acl_release(EXT4_I(inode)->i_acl); |
... | ... | @@ -720,7 +720,7 @@ |
720 | 720 | seq_puts(seq, ",debug"); |
721 | 721 | if (test_opt(sb, OLDALLOC)) |
722 | 722 | seq_puts(seq, ",oldalloc"); |
723 | -#ifdef CONFIG_EXT4DEV_FS_XATTR | |
723 | +#ifdef CONFIG_EXT4_FS_XATTR | |
724 | 724 | if (test_opt(sb, XATTR_USER) && |
725 | 725 | !(def_mount_opts & EXT4_DEFM_XATTR_USER)) |
726 | 726 | seq_puts(seq, ",user_xattr"); |
... | ... | @@ -729,7 +729,7 @@ |
729 | 729 | seq_puts(seq, ",nouser_xattr"); |
730 | 730 | } |
731 | 731 | #endif |
732 | -#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL | |
732 | +#ifdef CONFIG_EXT4_FS_POSIX_ACL | |
733 | 733 | if (test_opt(sb, POSIX_ACL) && !(def_mount_opts & EXT4_DEFM_ACL)) |
734 | 734 | seq_puts(seq, ",acl"); |
735 | 735 | if (!test_opt(sb, POSIX_ACL) && (def_mount_opts & EXT4_DEFM_ACL)) |
... | ... | @@ -1078,7 +1078,7 @@ |
1078 | 1078 | case Opt_orlov: |
1079 | 1079 | clear_opt(sbi->s_mount_opt, OLDALLOC); |
1080 | 1080 | break; |
1081 | -#ifdef CONFIG_EXT4DEV_FS_XATTR | |
1081 | +#ifdef CONFIG_EXT4_FS_XATTR | |
1082 | 1082 | case Opt_user_xattr: |
1083 | 1083 | set_opt(sbi->s_mount_opt, XATTR_USER); |
1084 | 1084 | break; |
... | ... | @@ -1092,7 +1092,7 @@ |
1092 | 1092 | "not supported\n"); |
1093 | 1093 | break; |
1094 | 1094 | #endif |
1095 | -#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL | |
1095 | +#ifdef CONFIG_EXT4_FS_POSIX_ACL | |
1096 | 1096 | case Opt_acl: |
1097 | 1097 | set_opt(sbi->s_mount_opt, POSIX_ACL); |
1098 | 1098 | break; |
1099 | 1099 | |
... | ... | @@ -1987,11 +1987,11 @@ |
1987 | 1987 | set_opt(sbi->s_mount_opt, GRPID); |
1988 | 1988 | if (def_mount_opts & EXT4_DEFM_UID16) |
1989 | 1989 | set_opt(sbi->s_mount_opt, NO_UID32); |
1990 | -#ifdef CONFIG_EXT4DEV_FS_XATTR | |
1990 | +#ifdef CONFIG_EXT4_FS_XATTR | |
1991 | 1991 | if (def_mount_opts & EXT4_DEFM_XATTR_USER) |
1992 | 1992 | set_opt(sbi->s_mount_opt, XATTR_USER); |
1993 | 1993 | #endif |
1994 | -#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL | |
1994 | +#ifdef CONFIG_EXT4_FS_POSIX_ACL | |
1995 | 1995 | if (def_mount_opts & EXT4_DEFM_ACL) |
1996 | 1996 | set_opt(sbi->s_mount_opt, POSIX_ACL); |
1997 | 1997 | #endif |
... | ... | @@ -2050,16 +2050,6 @@ |
2050 | 2050 | "running e2fsck is recommended\n"); |
2051 | 2051 | |
2052 | 2052 | /* |
2053 | - * Since ext4 is still considered development code, we require | |
2054 | - * that the TEST_FILESYS flag in s->flags be set. | |
2055 | - */ | |
2056 | - if (!(le32_to_cpu(es->s_flags) & EXT2_FLAGS_TEST_FILESYS)) { | |
2057 | - printk(KERN_WARNING "EXT4-fs: %s: not marked " | |
2058 | - "OK to use with test code.\n", sb->s_id); | |
2059 | - goto failed_mount; | |
2060 | - } | |
2061 | - | |
2062 | - /* | |
2063 | 2053 | * Check feature flags regardless of the revision level, since we |
2064 | 2054 | * previously didn't change the revision level when setting the flags, |
2065 | 2055 | * so there is a chance incompat flags are set on a rev 0 filesystem. |
2066 | 2056 | |
2067 | 2057 | |
... | ... | @@ -3580,13 +3570,34 @@ |
3580 | 3570 | }; |
3581 | 3571 | #endif |
3582 | 3572 | |
3573 | +static struct file_system_type ext4_fs_type = { | |
3574 | + .owner = THIS_MODULE, | |
3575 | + .name = "ext4", | |
3576 | + .get_sb = ext4_get_sb, | |
3577 | + .kill_sb = kill_block_super, | |
3578 | + .fs_flags = FS_REQUIRES_DEV, | |
3579 | +}; | |
3580 | + | |
3581 | +#ifdef CONFIG_EXT4DEV_COMPAT | |
3582 | +static int ext4dev_get_sb(struct file_system_type *fs_type, | |
3583 | + int flags, const char *dev_name, void *data, struct vfsmount *mnt) | |
3584 | +{ | |
3585 | + printk(KERN_WARNING "EXT4-fs: Update your userspace programs " | |
3586 | + "to mount using ext4\n"); | |
3587 | + printk(KERN_WARNING "EXT4-fs: ext4dev backwards compatibility " | |
3588 | + "will go away by 2.6.31\n"); | |
3589 | + return get_sb_bdev(fs_type, flags, dev_name, data, ext4_fill_super, mnt); | |
3590 | +} | |
3591 | + | |
3583 | 3592 | static struct file_system_type ext4dev_fs_type = { |
3584 | 3593 | .owner = THIS_MODULE, |
3585 | 3594 | .name = "ext4dev", |
3586 | - .get_sb = ext4_get_sb, | |
3595 | + .get_sb = ext4dev_get_sb, | |
3587 | 3596 | .kill_sb = kill_block_super, |
3588 | 3597 | .fs_flags = FS_REQUIRES_DEV, |
3589 | 3598 | }; |
3599 | +MODULE_ALIAS("ext4dev"); | |
3600 | +#endif | |
3590 | 3601 | |
3591 | 3602 | static int __init init_ext4_fs(void) |
3592 | 3603 | { |
3593 | 3604 | |
... | ... | @@ -3603,9 +3614,16 @@ |
3603 | 3614 | err = init_inodecache(); |
3604 | 3615 | if (err) |
3605 | 3616 | goto out1; |
3606 | - err = register_filesystem(&ext4dev_fs_type); | |
3617 | + err = register_filesystem(&ext4_fs_type); | |
3607 | 3618 | if (err) |
3608 | 3619 | goto out; |
3620 | +#ifdef CONFIG_EXT4DEV_COMPAT | |
3621 | + err = register_filesystem(&ext4dev_fs_type); | |
3622 | + if (err) { | |
3623 | + unregister_filesystem(&ext4_fs_type); | |
3624 | + goto out; | |
3625 | + } | |
3626 | +#endif | |
3609 | 3627 | return 0; |
3610 | 3628 | out: |
3611 | 3629 | destroy_inodecache(); |
3612 | 3630 | |
... | ... | @@ -3618,7 +3636,10 @@ |
3618 | 3636 | |
3619 | 3637 | static void __exit exit_ext4_fs(void) |
3620 | 3638 | { |
3639 | + unregister_filesystem(&ext4_fs_type); | |
3640 | +#ifdef CONFIG_EXT4DEV_COMPAT | |
3621 | 3641 | unregister_filesystem(&ext4dev_fs_type); |
3642 | +#endif | |
3622 | 3643 | destroy_inodecache(); |
3623 | 3644 | exit_ext4_xattr(); |
3624 | 3645 | exit_ext4_mballoc(); |
fs/ext4/symlink.c
... | ... | @@ -34,7 +34,7 @@ |
34 | 34 | .readlink = generic_readlink, |
35 | 35 | .follow_link = page_follow_link_light, |
36 | 36 | .put_link = page_put_link, |
37 | -#ifdef CONFIG_EXT4DEV_FS_XATTR | |
37 | +#ifdef CONFIG_EXT4_FS_XATTR | |
38 | 38 | .setxattr = generic_setxattr, |
39 | 39 | .getxattr = generic_getxattr, |
40 | 40 | .listxattr = ext4_listxattr, |
... | ... | @@ -45,7 +45,7 @@ |
45 | 45 | const struct inode_operations ext4_fast_symlink_inode_operations = { |
46 | 46 | .readlink = generic_readlink, |
47 | 47 | .follow_link = ext4_follow_link, |
48 | -#ifdef CONFIG_EXT4DEV_FS_XATTR | |
48 | +#ifdef CONFIG_EXT4_FS_XATTR | |
49 | 49 | .setxattr = generic_setxattr, |
50 | 50 | .getxattr = generic_getxattr, |
51 | 51 | .listxattr = ext4_listxattr, |
fs/ext4/xattr.c
... | ... | @@ -99,12 +99,12 @@ |
99 | 99 | |
100 | 100 | static struct xattr_handler *ext4_xattr_handler_map[] = { |
101 | 101 | [EXT4_XATTR_INDEX_USER] = &ext4_xattr_user_handler, |
102 | -#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL | |
102 | +#ifdef CONFIG_EXT4_FS_POSIX_ACL | |
103 | 103 | [EXT4_XATTR_INDEX_POSIX_ACL_ACCESS] = &ext4_xattr_acl_access_handler, |
104 | 104 | [EXT4_XATTR_INDEX_POSIX_ACL_DEFAULT] = &ext4_xattr_acl_default_handler, |
105 | 105 | #endif |
106 | 106 | [EXT4_XATTR_INDEX_TRUSTED] = &ext4_xattr_trusted_handler, |
107 | -#ifdef CONFIG_EXT4DEV_FS_SECURITY | |
107 | +#ifdef CONFIG_EXT4_FS_SECURITY | |
108 | 108 | [EXT4_XATTR_INDEX_SECURITY] = &ext4_xattr_security_handler, |
109 | 109 | #endif |
110 | 110 | }; |
111 | 111 | |
... | ... | @@ -112,11 +112,11 @@ |
112 | 112 | struct xattr_handler *ext4_xattr_handlers[] = { |
113 | 113 | &ext4_xattr_user_handler, |
114 | 114 | &ext4_xattr_trusted_handler, |
115 | -#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL | |
115 | +#ifdef CONFIG_EXT4_FS_POSIX_ACL | |
116 | 116 | &ext4_xattr_acl_access_handler, |
117 | 117 | &ext4_xattr_acl_default_handler, |
118 | 118 | #endif |
119 | -#ifdef CONFIG_EXT4DEV_FS_SECURITY | |
119 | +#ifdef CONFIG_EXT4_FS_SECURITY | |
120 | 120 | &ext4_xattr_security_handler, |
121 | 121 | #endif |
122 | 122 | NULL |
fs/ext4/xattr.h
... | ... | @@ -63,7 +63,7 @@ |
63 | 63 | EXT4_I(inode)->i_extra_isize)) |
64 | 64 | #define IFIRST(hdr) ((struct ext4_xattr_entry *)((hdr)+1)) |
65 | 65 | |
66 | -# ifdef CONFIG_EXT4DEV_FS_XATTR | |
66 | +# ifdef CONFIG_EXT4_FS_XATTR | |
67 | 67 | |
68 | 68 | extern struct xattr_handler ext4_xattr_user_handler; |
69 | 69 | extern struct xattr_handler ext4_xattr_trusted_handler; |
... | ... | @@ -88,7 +88,7 @@ |
88 | 88 | |
89 | 89 | extern struct xattr_handler *ext4_xattr_handlers[]; |
90 | 90 | |
91 | -# else /* CONFIG_EXT4DEV_FS_XATTR */ | |
91 | +# else /* CONFIG_EXT4_FS_XATTR */ | |
92 | 92 | |
93 | 93 | static inline int |
94 | 94 | ext4_xattr_get(struct inode *inode, int name_index, const char *name, |
95 | 95 | |
... | ... | @@ -141,9 +141,9 @@ |
141 | 141 | |
142 | 142 | #define ext4_xattr_handlers NULL |
143 | 143 | |
144 | -# endif /* CONFIG_EXT4DEV_FS_XATTR */ | |
144 | +# endif /* CONFIG_EXT4_FS_XATTR */ | |
145 | 145 | |
146 | -#ifdef CONFIG_EXT4DEV_FS_SECURITY | |
146 | +#ifdef CONFIG_EXT4_FS_SECURITY | |
147 | 147 | extern int ext4_init_security(handle_t *handle, struct inode *inode, |
148 | 148 | struct inode *dir); |
149 | 149 | #else |