Whamcloud - gitweb
e2fsprogs: add large_file to base mkfs features
authorEric Sandeen <sandeen@redhat.com>
Wed, 1 Oct 2014 12:33:54 +0000 (08:33 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 1 Oct 2014 12:33:54 +0000 (08:33 -0400)
large_file (> 2G) support has been around since at least kernel 2.4;
mkfs of any sufficiently large filesystem sets it "accidentally"
when the resize inode exceeds 2G.  This leaves very small
filesystems lacking the feature, which potentially changes
their behavior & codepaths the first time a > 2G file gets
written.

There's really no reason to be making fresh filesystems which
strive to keep compatibility with 10 year old kernels; just
enable large_file at mkfs time.  This is particularly obvious
for ext4 fielsystems, which set huge_file by default, but not
necessarily large_file.

If old-kernel compatibility is desired, mke2fs.conf can be
modified locally to remove the feature.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/mke2fs.c
misc/mke2fs.conf.in

index c9f5810..a14e62e 100644 (file)
@@ -1873,7 +1873,7 @@ profile_error:
        tmp = NULL;
        if (fs_param.s_rev_level != EXT2_GOOD_OLD_REV) {
                tmp = get_string_from_profile(fs_types, "base_features",
-                     "sparse_super,filetype,resize_inode,dir_index");
+                     "sparse_super,large_file,filetype,resize_inode,dir_index");
                edit_feature(tmp, &fs_param.s_feature_compat);
                free(tmp);
 
index 0871f77..47f59cc 100644 (file)
@@ -1,5 +1,5 @@
 [defaults]
-       base_features = sparse_super,filetype,resize_inode,dir_index,ext_attr
+       base_features = sparse_super,large_file,filetype,resize_inode,dir_index,ext_attr
        default_mntopts = acl,user_xattr
        enable_periodic_fsck = 0
        blocksize = 4096