diff options
author | Theodore Tso <tytso@MIT.EDU> | 2008-02-10 06:11:44 (GMT) |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2008-02-10 06:11:44 (GMT) |
commit | 469108ff3dcbc00313699d620c47f3ee1e7d19c6 (patch) | |
tree | d7cd5a7097d1c87b0dfc46297b05d297aabfdf62 /fs/ext4/super.c | |
parent | 26346ff681cb42c1436ed09c44dcae4809470dab (diff) | |
download | linux-fsl-qoriq-469108ff3dcbc00313699d620c47f3ee1e7d19c6.tar.xz |
ext4: Add new "development flag" to the ext4 filesystem
This flag is simply a generic "this is a crash/burn test filesystem"
marker. If it is set, then filesystem code which is "in development"
will be allowed to mount the filesystem. Filesystem code which is not
considered ready for prime-time will check for this flag, and if it is
not set, it will refuse to touch the filesystem.
As we start rolling ext4 out to distro's like Fedora, et. al, this makes
it less likely that a user might accidentally start using ext4 on a
production filesystem; a bad thing, since that will essentially make it
be unfsckable until e2fsprogs catches up.
Signed-off-by: Theodore Tso <tytso@MIT.EDU>
Signed-off-by: Mingming Cao <cmm@us.ibm.com>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r-- | fs/ext4/super.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 93beb86..0072da7 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1919,6 +1919,17 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent) printk(KERN_WARNING "EXT4-fs warning: feature flags set on rev 0 fs, " "running e2fsck is recommended\n"); + + /* + * Since ext4 is still considered development code, we require + * that the TEST_FILESYS flag in s->flags be set. + */ + if (!(le32_to_cpu(es->s_flags) & EXT2_FLAGS_TEST_FILESYS)) { + printk(KERN_WARNING "EXT4-fs: %s: not marked " + "OK to use with test code.\n", sb->s_id); + goto failed_mount; + } + /* * Check feature flags regardless of the revision level, since we * previously didn't change the revision level when setting the flags, |