aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/Kconfig88
-rw-r--r--fs/Makefile2
-rw-r--r--fs/ext4/Makefile10
-rw-r--r--fs/ext4/acl.h6
-rw-r--r--fs/ext4/ext4_i.h4
-rw-r--r--fs/ext4/file.c2
-rw-r--r--fs/ext4/inode.c2
-rw-r--r--fs/ext4/namei.c6
-rw-r--r--fs/ext4/super.c63
-rw-r--r--fs/ext4/symlink.c4
-rw-r--r--fs/ext4/xattr.c8
-rw-r--r--fs/ext4/xattr.h8
12 files changed, 119 insertions, 84 deletions
diff --git a/fs/Kconfig b/fs/Kconfig
index abccb5dab9a8..40183d94b683 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -136,37 +136,51 @@ config EXT3_FS_SECURITY
136 If you are not using a security module that requires using 136 If you are not using a security module that requires using
137 extended attributes for file security labels, say N. 137 extended attributes for file security labels, say N.
138 138
139config EXT4DEV_FS 139config EXT4_FS
140 tristate "Ext4dev/ext4 extended fs support development (EXPERIMENTAL)" 140 tristate "The Extended 4 (ext4) filesystem"
141 depends on EXPERIMENTAL
142 select JBD2 141 select JBD2
143 select CRC16 142 select CRC16
144 help 143 help
145 Ext4dev is a predecessor filesystem of the next generation 144 This is the next generation of the ext3 filesystem.
146 extended fs ext4, based on ext3 filesystem code. It will be
147 renamed ext4 fs later, once ext4dev is mature and stabilized.
148 145
149 Unlike the change from ext2 filesystem to ext3 filesystem, 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: 147 the on-disk format of ext4 is not forwards compatible with
151 it is based on extent maps and it supports 48-bit physical block 148 ext3; it is based on extent maps and it supports 48-bit
152 numbers. These combined on-disk format changes will allow 149 physical block numbers. The ext4 filesystem also supports delayed
153 ext4dev/ext4 to handle more than 16 TB filesystem volumes -- 150 allocation, persistent preallocation, high resolution time stamps,
154 a hard limit that ext3 cannot overcome without changing the 151 and a number of other features to improve performance and speed
155 on-disk format. 152 up fsck time. For more information, please see the web pages at
156 153 http://ext4.wiki.kernel.org.
157 Other than extent maps and 48-bit block numbers, ext4dev also is 154
158 likely to have other new features such as persistent preallocation, 155 The ext4 filesystem will support mounting an ext3
159 high resolution time stamps, and larger file support etc. These 156 filesystem; while there will be some performance gains from
160 features will be added to ext4dev gradually. 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 To compile this file system support as a module, choose M here. The 162 To compile this file system support as a module, choose M here. The
163 module will be called ext4dev. 163 module will be called ext4dev.
164 164
165 If unsure, say N. 165 If unsure, say N.
166 166
167config EXT4DEV_FS_XATTR 167config EXT4DEV_COMPAT
168 bool "Ext4dev extended attributes" 168 bool "Enable ext4dev compatibility"
169 depends on EXT4DEV_FS 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
181config EXT4_FS_XATTR
182 bool "Ext4 extended attributes"
183 depends on EXT4_FS
170 default y 184 default y
171 help 185 help
172 Extended attributes are name:value pairs associated with inodes by 186 Extended attributes are name:value pairs associated with inodes by
@@ -175,11 +189,11 @@ config EXT4DEV_FS_XATTR
175 189
176 If unsure, say N. 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
180config EXT4DEV_FS_POSIX_ACL 194config EXT4_FS_POSIX_ACL
181 bool "Ext4dev POSIX Access Control Lists" 195 bool "Ext4 POSIX Access Control Lists"
182 depends on EXT4DEV_FS_XATTR 196 depends on EXT4_FS_XATTR
183 select FS_POSIX_ACL 197 select FS_POSIX_ACL
184 help 198 help
185 POSIX Access Control Lists (ACLs) support permissions for users and 199 POSIX Access Control Lists (ACLs) support permissions for users and
@@ -190,14 +204,14 @@ config EXT4DEV_FS_POSIX_ACL
190 204
191 If you don't know what Access Control Lists are, say N 205 If you don't know what Access Control Lists are, say N
192 206
193config EXT4DEV_FS_SECURITY 207config EXT4_FS_SECURITY
194 bool "Ext4dev Security Labels" 208 bool "Ext4 Security Labels"
195 depends on EXT4DEV_FS_XATTR 209 depends on EXT4_FS_XATTR
196 help 210 help
197 Security labels support alternative access control models 211 Security labels support alternative access control models
198 implemented by security modules like SELinux. This option 212 implemented by security modules like SELinux. This option
199 enables an extended attribute handler for file security 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 If you are not using a security module that requires using 216 If you are not using a security module that requires using
203 extended attributes for file security labels, say N. 217 extended attributes for file security labels, say N.
@@ -240,22 +254,22 @@ config JBD2
240 help 254 help
241 This is a generic journaling layer for block devices that support 255 This is a generic journaling layer for block devices that support
242 both 32-bit and 64-bit block numbers. It is currently used by 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 journal support to other file systems or block devices such 258 journal support to other file systems or block devices such
245 as RAID or LVM. 259 as RAID or LVM.
246 260
247 If you are using ext4dev/ext4, you need to say Y here. If you are not 261 If you are using ext4, you need to say Y here. If you are not
248 using ext4dev/ext4 then you will probably want to say N. 262 using ext4 then you will probably want to say N.
249 263
250 To compile this device as a module, choose M here. The module will be 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 you cannot compile this code as a module. 266 you cannot compile this code as a module.
253 267
254config JBD2_DEBUG 268config JBD2_DEBUG
255 bool "JBD2 (ext4dev/ext4) debugging support" 269 bool "JBD2 (ext4) debugging support"
256 depends on JBD2 && DEBUG_FS 270 depends on JBD2 && DEBUG_FS
257 help 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 potentially any other filesystem/device using JBD2), this option 273 potentially any other filesystem/device using JBD2), this option
260 allows you to enable debugging output while the system is running, 274 allows you to enable debugging output while the system is running,
261 in order to help track down any problems you are having. 275 in order to help track down any problems you are having.
@@ -270,9 +284,9 @@ config JBD2_DEBUG
270config FS_MBCACHE 284config FS_MBCACHE
271# Meta block cache for Extended Attributes (ext2/ext3/ext4) 285# Meta block cache for Extended Attributes (ext2/ext3/ext4)
272 tristate 286 tristate
273 depends on EXT2_FS_XATTR || EXT3_FS_XATTR || EXT4DEV_FS_XATTR 287 depends on EXT2_FS_XATTR || EXT3_FS_XATTR || EXT4_FS_XATTR
274 default y if EXT2_FS=y || EXT3_FS=y || EXT4DEV_FS=y 288 default y if EXT2_FS=y || EXT3_FS=y || EXT4_FS=y
275 default m if EXT2_FS=m || EXT3_FS=m || EXT4DEV_FS=m 289 default m if EXT2_FS=m || EXT3_FS=m || EXT4_FS=m
276 290
277config REISERFS_FS 291config REISERFS_FS
278 tristate "Reiserfs support" 292 tristate "Reiserfs support"
diff --git a/fs/Makefile b/fs/Makefile
index a1482a5eff15..de404b00eb0c 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -69,7 +69,7 @@ obj-$(CONFIG_DLM) += dlm/
69# Do not add any filesystems before this line 69# Do not add any filesystems before this line
70obj-$(CONFIG_REISERFS_FS) += reiserfs/ 70obj-$(CONFIG_REISERFS_FS) += reiserfs/
71obj-$(CONFIG_EXT3_FS) += ext3/ # Before ext2 so root fs can be ext3 71obj-$(CONFIG_EXT3_FS) += ext3/ # Before ext2 so root fs can be ext3
72obj-$(CONFIG_EXT4DEV_FS) += ext4/ # Before ext2 so root fs can be ext4dev 72obj-$(CONFIG_EXT4_FS) += ext4/ # Before ext2 so root fs can be ext4dev
73obj-$(CONFIG_JBD) += jbd/ 73obj-$(CONFIG_JBD) += jbd/
74obj-$(CONFIG_JBD2) += jbd2/ 74obj-$(CONFIG_JBD2) += jbd2/
75obj-$(CONFIG_EXT2_FS) += ext2/ 75obj-$(CONFIG_EXT2_FS) += ext2/
diff --git a/fs/ext4/Makefile b/fs/ext4/Makefile
index ac6fa8ca0a2f..a8ff003a00f7 100644
--- a/fs/ext4/Makefile
+++ b/fs/ext4/Makefile
@@ -2,12 +2,12 @@
2# Makefile for the linux ext4-filesystem routines. 2# Makefile for the linux ext4-filesystem routines.
3# 3#
4 4
5obj-$(CONFIG_EXT4DEV_FS) += ext4dev.o 5obj-$(CONFIG_EXT4_FS) += ext4.o
6 6
7ext4dev-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \ 7ext4-y := balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \
8 ioctl.o namei.o super.o symlink.o hash.o resize.o extents.o \ 8 ioctl.o namei.o super.o symlink.o hash.o resize.o extents.o \
9 ext4_jbd2.o migrate.o mballoc.o 9 ext4_jbd2.o migrate.o mballoc.o
10 10
11ext4dev-$(CONFIG_EXT4DEV_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o 11ext4-$(CONFIG_EXT4_FS_XATTR) += xattr.o xattr_user.o xattr_trusted.o
12ext4dev-$(CONFIG_EXT4DEV_FS_POSIX_ACL) += acl.o 12ext4-$(CONFIG_EXT4_FS_POSIX_ACL) += acl.o
13ext4dev-$(CONFIG_EXT4DEV_FS_SECURITY) += xattr_security.o 13ext4-$(CONFIG_EXT4_FS_SECURITY) += xattr_security.o
diff --git a/fs/ext4/acl.h b/fs/ext4/acl.h
index 4c9948f69f8b..cb45257a246e 100644
--- a/fs/ext4/acl.h
+++ b/fs/ext4/acl.h
@@ -51,7 +51,7 @@ static inline int ext4_acl_count(size_t size)
51 } 51 }
52} 52}
53 53
54#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL 54#ifdef CONFIG_EXT4_FS_POSIX_ACL
55 55
56/* Value for inode->u.ext4_i.i_acl and inode->u.ext4_i.i_default_acl 56/* Value for inode->u.ext4_i.i_acl and inode->u.ext4_i.i_default_acl
57 if the ACL has not been cached */ 57 if the ACL has not been cached */
@@ -62,7 +62,7 @@ extern int ext4_permission(struct inode *, int);
62extern int ext4_acl_chmod(struct inode *); 62extern int ext4_acl_chmod(struct inode *);
63extern int ext4_init_acl(handle_t *, struct inode *, struct inode *); 63extern 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#include <linux/sched.h> 66#include <linux/sched.h>
67#define ext4_permission NULL 67#define ext4_permission NULL
68 68
@@ -77,5 +77,5 @@ ext4_init_acl(handle_t *handle, struct inode *inode, struct inode *dir)
77{ 77{
78 return 0; 78 return 0;
79} 79}
80#endif /* CONFIG_EXT4DEV_FS_POSIX_ACL */ 80#endif /* CONFIG_EXT4_FS_POSIX_ACL */
81 81
diff --git a/fs/ext4/ext4_i.h b/fs/ext4/ext4_i.h
index 2875eeca1727..5c124c0ac6d3 100644
--- a/fs/ext4/ext4_i.h
+++ b/fs/ext4/ext4_i.h
@@ -66,7 +66,7 @@ struct ext4_inode_info {
66 __u32 i_state; /* Dynamic state flags for ext4 */ 66 __u32 i_state; /* Dynamic state flags for ext4 */
67 67
68 ext4_lblk_t i_dir_start_lookup; 68 ext4_lblk_t i_dir_start_lookup;
69#ifdef CONFIG_EXT4DEV_FS_XATTR 69#ifdef CONFIG_EXT4_FS_XATTR
70 /* 70 /*
71 * Extended attributes can be read independently of the main file 71 * Extended attributes can be read independently of the main file
72 * data. Taking i_mutex even when reading would cause contention 72 * data. Taking i_mutex even when reading would cause contention
@@ -76,7 +76,7 @@ struct ext4_inode_info {
76 */ 76 */
77 struct rw_semaphore xattr_sem; 77 struct rw_semaphore xattr_sem;
78#endif 78#endif
79#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL 79#ifdef CONFIG_EXT4_FS_POSIX_ACL
80 struct posix_acl *i_acl; 80 struct posix_acl *i_acl;
81 struct posix_acl *i_default_acl; 81 struct posix_acl *i_default_acl;
82#endif 82#endif
diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index 6d5be156202a..6bd11fba71f7 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -165,7 +165,7 @@ const struct inode_operations ext4_file_inode_operations = {
165 .truncate = ext4_truncate, 165 .truncate = ext4_truncate,
166 .setattr = ext4_setattr, 166 .setattr = ext4_setattr,
167 .getattr = ext4_getattr, 167 .getattr = ext4_getattr,
168#ifdef CONFIG_EXT4DEV_FS_XATTR 168#ifdef CONFIG_EXT4_FS_XATTR
169 .setxattr = generic_setxattr, 169 .setxattr = generic_setxattr,
170 .getxattr = generic_getxattr, 170 .getxattr = generic_getxattr,
171 .listxattr = ext4_listxattr, 171 .listxattr = ext4_listxattr,
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index a4747867411f..9b4ec9decfd1 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -4041,7 +4041,7 @@ struct inode *ext4_iget(struct super_block *sb, unsigned long ino)
4041 return inode; 4041 return inode;
4042 4042
4043 ei = EXT4_I(inode); 4043 ei = EXT4_I(inode);
4044#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL 4044#ifdef CONFIG_EXT4_FS_POSIX_ACL
4045 ei->i_acl = EXT4_ACL_NOT_CACHED; 4045 ei->i_acl = EXT4_ACL_NOT_CACHED;
4046 ei->i_default_acl = EXT4_ACL_NOT_CACHED; 4046 ei->i_default_acl = EXT4_ACL_NOT_CACHED;
4047#endif 4047#endif
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 5295a9225cf9..92db9e945147 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -1773,7 +1773,7 @@ retry:
1773 err = PTR_ERR(inode); 1773 err = PTR_ERR(inode);
1774 if (!IS_ERR(inode)) { 1774 if (!IS_ERR(inode)) {
1775 init_special_inode(inode, inode->i_mode, rdev); 1775 init_special_inode(inode, inode->i_mode, rdev);
1776#ifdef CONFIG_EXT4DEV_FS_XATTR 1776#ifdef CONFIG_EXT4_FS_XATTR
1777 inode->i_op = &ext4_special_inode_operations; 1777 inode->i_op = &ext4_special_inode_operations;
1778#endif 1778#endif
1779 err = ext4_add_nondir(handle, dentry, inode); 1779 err = ext4_add_nondir(handle, dentry, inode);
@@ -2456,7 +2456,7 @@ const struct inode_operations ext4_dir_inode_operations = {
2456 .mknod = ext4_mknod, 2456 .mknod = ext4_mknod,
2457 .rename = ext4_rename, 2457 .rename = ext4_rename,
2458 .setattr = ext4_setattr, 2458 .setattr = ext4_setattr,
2459#ifdef CONFIG_EXT4DEV_FS_XATTR 2459#ifdef CONFIG_EXT4_FS_XATTR
2460 .setxattr = generic_setxattr, 2460 .setxattr = generic_setxattr,
2461 .getxattr = generic_getxattr, 2461 .getxattr = generic_getxattr,
2462 .listxattr = ext4_listxattr, 2462 .listxattr = ext4_listxattr,
@@ -2467,7 +2467,7 @@ const struct inode_operations ext4_dir_inode_operations = {
2467 2467
2468const struct inode_operations ext4_special_inode_operations = { 2468const struct inode_operations ext4_special_inode_operations = {
2469 .setattr = ext4_setattr, 2469 .setattr = ext4_setattr,
2470#ifdef CONFIG_EXT4DEV_FS_XATTR 2470#ifdef CONFIG_EXT4_FS_XATTR
2471 .setxattr = generic_setxattr, 2471 .setxattr = generic_setxattr,
2472 .getxattr = generic_getxattr, 2472 .getxattr = generic_getxattr,
2473 .listxattr = ext4_listxattr, 2473 .listxattr = ext4_listxattr,
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 7d865608e817..0e661c569660 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -569,7 +569,7 @@ static struct inode *ext4_alloc_inode(struct super_block *sb)
569 ei = kmem_cache_alloc(ext4_inode_cachep, GFP_NOFS); 569 ei = kmem_cache_alloc(ext4_inode_cachep, GFP_NOFS);
570 if (!ei) 570 if (!ei)
571 return NULL; 571 return NULL;
572#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL 572#ifdef CONFIG_EXT4_FS_POSIX_ACL
573 ei->i_acl = EXT4_ACL_NOT_CACHED; 573 ei->i_acl = EXT4_ACL_NOT_CACHED;
574 ei->i_default_acl = EXT4_ACL_NOT_CACHED; 574 ei->i_default_acl = EXT4_ACL_NOT_CACHED;
575#endif 575#endif
@@ -605,7 +605,7 @@ static void init_once(void *foo)
605 struct ext4_inode_info *ei = (struct ext4_inode_info *) foo; 605 struct ext4_inode_info *ei = (struct ext4_inode_info *) foo;
606 606
607 INIT_LIST_HEAD(&ei->i_orphan); 607 INIT_LIST_HEAD(&ei->i_orphan);
608#ifdef CONFIG_EXT4DEV_FS_XATTR 608#ifdef CONFIG_EXT4_FS_XATTR
609 init_rwsem(&ei->xattr_sem); 609 init_rwsem(&ei->xattr_sem);
610#endif 610#endif
611 init_rwsem(&ei->i_data_sem); 611 init_rwsem(&ei->i_data_sem);
@@ -631,7 +631,7 @@ static void destroy_inodecache(void)
631 631
632static void ext4_clear_inode(struct inode *inode) 632static void ext4_clear_inode(struct inode *inode)
633{ 633{
634#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL 634#ifdef CONFIG_EXT4_FS_POSIX_ACL
635 if (EXT4_I(inode)->i_acl && 635 if (EXT4_I(inode)->i_acl &&
636 EXT4_I(inode)->i_acl != EXT4_ACL_NOT_CACHED) { 636 EXT4_I(inode)->i_acl != EXT4_ACL_NOT_CACHED) {
637 posix_acl_release(EXT4_I(inode)->i_acl); 637 posix_acl_release(EXT4_I(inode)->i_acl);
@@ -720,7 +720,7 @@ static int ext4_show_options(struct seq_file *seq, struct vfsmount *vfs)
720 seq_puts(seq, ",debug"); 720 seq_puts(seq, ",debug");
721 if (test_opt(sb, OLDALLOC)) 721 if (test_opt(sb, OLDALLOC))
722 seq_puts(seq, ",oldalloc"); 722 seq_puts(seq, ",oldalloc");
723#ifdef CONFIG_EXT4DEV_FS_XATTR 723#ifdef CONFIG_EXT4_FS_XATTR
724 if (test_opt(sb, XATTR_USER) && 724 if (test_opt(sb, XATTR_USER) &&
725 !(def_mount_opts & EXT4_DEFM_XATTR_USER)) 725 !(def_mount_opts & EXT4_DEFM_XATTR_USER))
726 seq_puts(seq, ",user_xattr"); 726 seq_puts(seq, ",user_xattr");
@@ -729,7 +729,7 @@ static int ext4_show_options(struct seq_file *seq, struct vfsmount *vfs)
729 seq_puts(seq, ",nouser_xattr"); 729 seq_puts(seq, ",nouser_xattr");
730 } 730 }
731#endif 731#endif
732#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL 732#ifdef CONFIG_EXT4_FS_POSIX_ACL
733 if (test_opt(sb, POSIX_ACL) && !(def_mount_opts & EXT4_DEFM_ACL)) 733 if (test_opt(sb, POSIX_ACL) && !(def_mount_opts & EXT4_DEFM_ACL))
734 seq_puts(seq, ",acl"); 734 seq_puts(seq, ",acl");
735 if (!test_opt(sb, POSIX_ACL) && (def_mount_opts & EXT4_DEFM_ACL)) 735 if (!test_opt(sb, POSIX_ACL) && (def_mount_opts & EXT4_DEFM_ACL))
@@ -1078,7 +1078,7 @@ static int parse_options(char *options, struct super_block *sb,
1078 case Opt_orlov: 1078 case Opt_orlov:
1079 clear_opt(sbi->s_mount_opt, OLDALLOC); 1079 clear_opt(sbi->s_mount_opt, OLDALLOC);
1080 break; 1080 break;
1081#ifdef CONFIG_EXT4DEV_FS_XATTR 1081#ifdef CONFIG_EXT4_FS_XATTR
1082 case Opt_user_xattr: 1082 case Opt_user_xattr:
1083 set_opt(sbi->s_mount_opt, XATTR_USER); 1083 set_opt(sbi->s_mount_opt, XATTR_USER);
1084 break; 1084 break;
@@ -1092,7 +1092,7 @@ static int parse_options(char *options, struct super_block *sb,
1092 "not supported\n"); 1092 "not supported\n");
1093 break; 1093 break;
1094#endif 1094#endif
1095#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL 1095#ifdef CONFIG_EXT4_FS_POSIX_ACL
1096 case Opt_acl: 1096 case Opt_acl:
1097 set_opt(sbi->s_mount_opt, POSIX_ACL); 1097 set_opt(sbi->s_mount_opt, POSIX_ACL);
1098 break; 1098 break;
@@ -1987,11 +1987,11 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
1987 set_opt(sbi->s_mount_opt, GRPID); 1987 set_opt(sbi->s_mount_opt, GRPID);
1988 if (def_mount_opts & EXT4_DEFM_UID16) 1988 if (def_mount_opts & EXT4_DEFM_UID16)
1989 set_opt(sbi->s_mount_opt, NO_UID32); 1989 set_opt(sbi->s_mount_opt, NO_UID32);
1990#ifdef CONFIG_EXT4DEV_FS_XATTR 1990#ifdef CONFIG_EXT4_FS_XATTR
1991 if (def_mount_opts & EXT4_DEFM_XATTR_USER) 1991 if (def_mount_opts & EXT4_DEFM_XATTR_USER)
1992 set_opt(sbi->s_mount_opt, XATTR_USER); 1992 set_opt(sbi->s_mount_opt, XATTR_USER);
1993#endif 1993#endif
1994#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL 1994#ifdef CONFIG_EXT4_FS_POSIX_ACL
1995 if (def_mount_opts & EXT4_DEFM_ACL) 1995 if (def_mount_opts & EXT4_DEFM_ACL)
1996 set_opt(sbi->s_mount_opt, POSIX_ACL); 1996 set_opt(sbi->s_mount_opt, POSIX_ACL);
1997#endif 1997#endif
@@ -2050,16 +2050,6 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
2050 "running e2fsck is recommended\n"); 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 * Check feature flags regardless of the revision level, since we 2053 * Check feature flags regardless of the revision level, since we
2064 * previously didn't change the revision level when setting the flags, 2054 * previously didn't change the revision level when setting the flags,
2065 * so there is a chance incompat flags are set on a rev 0 filesystem. 2055 * so there is a chance incompat flags are set on a rev 0 filesystem.
@@ -3580,13 +3570,34 @@ const struct file_operations ext4_ui_proc_fops = {
3580}; 3570};
3581#endif 3571#endif
3582 3572
3573static 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
3582static 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
3583static struct file_system_type ext4dev_fs_type = { 3592static struct file_system_type ext4dev_fs_type = {
3584 .owner = THIS_MODULE, 3593 .owner = THIS_MODULE,
3585 .name = "ext4dev", 3594 .name = "ext4dev",
3586 .get_sb = ext4_get_sb, 3595 .get_sb = ext4dev_get_sb,
3587 .kill_sb = kill_block_super, 3596 .kill_sb = kill_block_super,
3588 .fs_flags = FS_REQUIRES_DEV, 3597 .fs_flags = FS_REQUIRES_DEV,
3589}; 3598};
3599MODULE_ALIAS("ext4dev");
3600#endif
3590 3601
3591static int __init init_ext4_fs(void) 3602static int __init init_ext4_fs(void)
3592{ 3603{
@@ -3603,9 +3614,16 @@ static int __init init_ext4_fs(void)
3603 err = init_inodecache(); 3614 err = init_inodecache();
3604 if (err) 3615 if (err)
3605 goto out1; 3616 goto out1;
3606 err = register_filesystem(&ext4dev_fs_type); 3617 err = register_filesystem(&ext4_fs_type);
3607 if (err) 3618 if (err)
3608 goto out; 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 return 0; 3627 return 0;
3610out: 3628out:
3611 destroy_inodecache(); 3629 destroy_inodecache();
@@ -3618,7 +3636,10 @@ out2:
3618 3636
3619static void __exit exit_ext4_fs(void) 3637static void __exit exit_ext4_fs(void)
3620{ 3638{
3639 unregister_filesystem(&ext4_fs_type);
3640#ifdef CONFIG_EXT4DEV_COMPAT
3621 unregister_filesystem(&ext4dev_fs_type); 3641 unregister_filesystem(&ext4dev_fs_type);
3642#endif
3622 destroy_inodecache(); 3643 destroy_inodecache();
3623 exit_ext4_xattr(); 3644 exit_ext4_xattr();
3624 exit_ext4_mballoc(); 3645 exit_ext4_mballoc();
diff --git a/fs/ext4/symlink.c b/fs/ext4/symlink.c
index 0013d52f73bb..00740cb32be3 100644
--- a/fs/ext4/symlink.c
+++ b/fs/ext4/symlink.c
@@ -34,7 +34,7 @@ const struct inode_operations ext4_symlink_inode_operations = {
34 .readlink = generic_readlink, 34 .readlink = generic_readlink,
35 .follow_link = page_follow_link_light, 35 .follow_link = page_follow_link_light,
36 .put_link = page_put_link, 36 .put_link = page_put_link,
37#ifdef CONFIG_EXT4DEV_FS_XATTR 37#ifdef CONFIG_EXT4_FS_XATTR
38 .setxattr = generic_setxattr, 38 .setxattr = generic_setxattr,
39 .getxattr = generic_getxattr, 39 .getxattr = generic_getxattr,
40 .listxattr = ext4_listxattr, 40 .listxattr = ext4_listxattr,
@@ -45,7 +45,7 @@ const struct inode_operations ext4_symlink_inode_operations = {
45const struct inode_operations ext4_fast_symlink_inode_operations = { 45const struct inode_operations ext4_fast_symlink_inode_operations = {
46 .readlink = generic_readlink, 46 .readlink = generic_readlink,
47 .follow_link = ext4_follow_link, 47 .follow_link = ext4_follow_link,
48#ifdef CONFIG_EXT4DEV_FS_XATTR 48#ifdef CONFIG_EXT4_FS_XATTR
49 .setxattr = generic_setxattr, 49 .setxattr = generic_setxattr,
50 .getxattr = generic_getxattr, 50 .getxattr = generic_getxattr,
51 .listxattr = ext4_listxattr, 51 .listxattr = ext4_listxattr,
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index 362b0edd3dbe..80626d516fee 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -99,12 +99,12 @@ static struct mb_cache *ext4_xattr_cache;
99 99
100static struct xattr_handler *ext4_xattr_handler_map[] = { 100static struct xattr_handler *ext4_xattr_handler_map[] = {
101 [EXT4_XATTR_INDEX_USER] = &ext4_xattr_user_handler, 101 [EXT4_XATTR_INDEX_USER] = &ext4_xattr_user_handler,
102#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL 102#ifdef CONFIG_EXT4_FS_POSIX_ACL
103 [EXT4_XATTR_INDEX_POSIX_ACL_ACCESS] = &ext4_xattr_acl_access_handler, 103 [EXT4_XATTR_INDEX_POSIX_ACL_ACCESS] = &ext4_xattr_acl_access_handler,
104 [EXT4_XATTR_INDEX_POSIX_ACL_DEFAULT] = &ext4_xattr_acl_default_handler, 104 [EXT4_XATTR_INDEX_POSIX_ACL_DEFAULT] = &ext4_xattr_acl_default_handler,
105#endif 105#endif
106 [EXT4_XATTR_INDEX_TRUSTED] = &ext4_xattr_trusted_handler, 106 [EXT4_XATTR_INDEX_TRUSTED] = &ext4_xattr_trusted_handler,
107#ifdef CONFIG_EXT4DEV_FS_SECURITY 107#ifdef CONFIG_EXT4_FS_SECURITY
108 [EXT4_XATTR_INDEX_SECURITY] = &ext4_xattr_security_handler, 108 [EXT4_XATTR_INDEX_SECURITY] = &ext4_xattr_security_handler,
109#endif 109#endif
110}; 110};
@@ -112,11 +112,11 @@ static struct xattr_handler *ext4_xattr_handler_map[] = {
112struct xattr_handler *ext4_xattr_handlers[] = { 112struct xattr_handler *ext4_xattr_handlers[] = {
113 &ext4_xattr_user_handler, 113 &ext4_xattr_user_handler,
114 &ext4_xattr_trusted_handler, 114 &ext4_xattr_trusted_handler,
115#ifdef CONFIG_EXT4DEV_FS_POSIX_ACL 115#ifdef CONFIG_EXT4_FS_POSIX_ACL
116 &ext4_xattr_acl_access_handler, 116 &ext4_xattr_acl_access_handler,
117 &ext4_xattr_acl_default_handler, 117 &ext4_xattr_acl_default_handler,
118#endif 118#endif
119#ifdef CONFIG_EXT4DEV_FS_SECURITY 119#ifdef CONFIG_EXT4_FS_SECURITY
120 &ext4_xattr_security_handler, 120 &ext4_xattr_security_handler,
121#endif 121#endif
122 NULL 122 NULL
diff --git a/fs/ext4/xattr.h b/fs/ext4/xattr.h
index 814ea58d4d57..8ede88b18c29 100644
--- a/fs/ext4/xattr.h
+++ b/fs/ext4/xattr.h
@@ -63,7 +63,7 @@ struct ext4_xattr_entry {
63 EXT4_I(inode)->i_extra_isize)) 63 EXT4_I(inode)->i_extra_isize))
64#define IFIRST(hdr) ((struct ext4_xattr_entry *)((hdr)+1)) 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
68extern struct xattr_handler ext4_xattr_user_handler; 68extern struct xattr_handler ext4_xattr_user_handler;
69extern struct xattr_handler ext4_xattr_trusted_handler; 69extern struct xattr_handler ext4_xattr_trusted_handler;
@@ -88,7 +88,7 @@ extern void exit_ext4_xattr(void);
88 88
89extern struct xattr_handler *ext4_xattr_handlers[]; 89extern struct xattr_handler *ext4_xattr_handlers[];
90 90
91# else /* CONFIG_EXT4DEV_FS_XATTR */ 91# else /* CONFIG_EXT4_FS_XATTR */
92 92
93static inline int 93static inline int
94ext4_xattr_get(struct inode *inode, int name_index, const char *name, 94ext4_xattr_get(struct inode *inode, int name_index, const char *name,
@@ -141,9 +141,9 @@ ext4_expand_extra_isize_ea(struct inode *inode, int new_extra_isize,
141 141
142#define ext4_xattr_handlers NULL 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
147extern int ext4_init_security(handle_t *handle, struct inode *inode, 147extern int ext4_init_security(handle_t *handle, struct inode *inode,
148 struct inode *dir); 148 struct inode *dir);
149#else 149#else