mke2fs: Add discard option into mke2fs.conf

Allow to specify discard in mke2fs.conf. Also change the way how to
specify default value for lazy_itable_init. It is better to have all
this defaulting done in the same place so do it in definition (as we do
with discard).

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
Lukas Czerner 2010-11-18 14:38:41 +01:00 committed by Theodore Ts'o
parent 0bc85dfb38
commit 7fe5ff3c1e
2 changed files with 8 additions and 2 deletions

View File

@ -80,12 +80,12 @@ int cflag;
int verbose;
int quiet;
int super_only;
int discard = 1;
int discard = 1; /* attempt to discard device before fs creation */
int force;
int noaction;
int journal_size;
int journal_flags;
int lazy_itable_init; /* use lazy inode table init */
int lazy_itable_init;
char *bad_blocks_filename;
__u32 fs_stride;
@ -1749,6 +1749,7 @@ got_size:
lazy_itable_init = get_bool_from_profile(fs_types,
"lazy_itable_init",
lazy_itable_init);
discard = get_bool_from_profile(fs_types, "discard" , discard);
/* Get options from profile */
for (cpp = fs_types; *cpp; cpp++) {

View File

@ -352,6 +352,11 @@ option. This can be used to configure the default extended options used
by
.BR mke2fs (8)
on a per-filesystem type basis.
.TP
.I discard
This relation is a boolean which specifies whether the
.BR mke2fs (8)
should attempt to discard device prior to filesystem creation.
.SH FILES
.TP
.I /etc/mke2fs.conf