]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
mke2fs: Add the ability to configure default extended options in mke2fs.conf
authorTheodore Ts'o <tytso@mit.edu>
Wed, 14 May 2008 22:09:37 +0000 (18:09 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 14 May 2008 22:41:01 +0000 (18:41 -0400)
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
misc/mke2fs.c
misc/mke2fs.conf.5.in

index 83c2dd4ff1b1634dce63c074f0fe2017572800bd..a955af1264f21dc24298f77a0ddbc958a4c1e52a 100644 (file)
@@ -1048,7 +1048,7 @@ static void PRS(int argc, char *argv[])
 {
        int             b, c;
        int             size;
-       char            *tmp, *tmp2;
+       char            *tmp, *tmp2, **cpp;
        int             blocksize = 0;
        int             inode_ratio = 0;
        int             inode_size = 0;
@@ -1472,8 +1472,6 @@ static void PRS(int argc, char *argv[])
 
        tmp = NULL;
        if (fs_param.s_rev_level != EXT2_GOOD_OLD_REV) {
-               char **cpp;
-
                tmp = get_string_from_profile(fs_types, "base_features",
                      "sparse_super,filetype,resize_inode,dir_index");
                edit_feature(tmp, &fs_param.s_feature_compat);
@@ -1592,6 +1590,16 @@ static void PRS(int argc, char *argv[])
        lazy_itable_init = get_bool_from_profile(fs_types, 
                                                 "lazy_itable_init", 0);
        
+       /* Get options from profile */
+       for (cpp = fs_types; *cpp; cpp++) {
+               tmp = NULL;
+               profile_get_string(profile, "fs_types", *cpp, "options", "", &tmp);
+                       if (tmp && *tmp)
+                               parse_extended_opts(&fs_param, tmp);
+                       if (tmp)
+                               free(tmp);
+       }
+
        if (extended_opts)
                parse_extended_opts(&fs_param, extended_opts);
 
index 40efb42fb690b5313fa9ad8c11f8b15a620760f2..04bffc5baa49065a5fa52650d14ac043c2171851 100644 (file)
@@ -324,6 +324,16 @@ together to create one large virtual block group on an ext4 filesystem.
 This improves meta-data locality and performance on meta-data heavy
 workloads.  The number of goups must be a power of 2 and may only be
 specified if the flex_bg filesystem feature is enabled.
+.I options
+This relation specifies additional extended options which should be
+treated by
+.BR mke2fs (8)
+as if they were prepended to the argument of the
+.B -E
+option.  This can be used to configure the default extended options used
+by
+.BR mke2fs (8)
+on a per-filesystem type basis.
 .SH FILES
 .TP
 .I /etc/mke2fs.conf