aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 2bf9cdd7a036..1cb371dcd609 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1324,6 +1324,13 @@ set_qf_format:
1324 clear_opt(sbi->s_mount_opt, NOBH); 1324 clear_opt(sbi->s_mount_opt, NOBH);
1325 break; 1325 break;
1326 case Opt_extents: 1326 case Opt_extents:
1327 if (!EXT4_HAS_INCOMPAT_FEATURE(sb,
1328 EXT4_FEATURE_INCOMPAT_EXTENTS)) {
1329 ext4_warning(sb, __func__,
1330 "extents feature not enabled "
1331 "on this filesystem, use tune2fs\n");
1332 return 0;
1333 }
1327 set_opt (sbi->s_mount_opt, EXTENTS); 1334 set_opt (sbi->s_mount_opt, EXTENTS);
1328 break; 1335 break;
1329 case Opt_noextents: 1336 case Opt_noextents:
@@ -1997,12 +2004,18 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent)
1997 2004
1998 /* 2005 /*
1999 * turn on extents feature by default in ext4 filesystem 2006 * turn on extents feature by default in ext4 filesystem
2000 * User -o noextents to turn it off 2007 * only if feature flag already set by mkfs or tune2fs.
2008 * Use -o noextents to turn it off
2001 */ 2009 */
2002 set_opt(sbi->s_mount_opt, EXTENTS); 2010 if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS))
2011 set_opt(sbi->s_mount_opt, EXTENTS);
2012 else
2013 ext4_warning(sb, __func__,
2014 "extents feature not enabled on this filesystem, "
2015 "use tune2fs.\n");
2003 /* 2016 /*
2004 * turn on mballoc feature by default in ext4 filesystem 2017 * turn on mballoc code by default in ext4 filesystem
2005 * User -o nomballoc to turn it off 2018 * Use -o nomballoc to turn it off
2006 */ 2019 */
2007 set_opt(sbi->s_mount_opt, MBALLOC); 2020 set_opt(sbi->s_mount_opt, MBALLOC);
2008 2021