From: Lukas Czerner <lczerner@redhat.com>
To: tytso@mit.edu
Cc: sandeen@redhat.com, adilger@dilger.ca, lczerner@redhat.com,
linux-ext4@vger.kernel.org
Subject: [PATCH 6/6] mke2fs: Add discard option into mke2fs.conf
Date: Thu, 18 Nov 2010 14:38:41 +0100 [thread overview]
Message-ID: <1290087521-9123-7-git-send-email-lczerner@redhat.com> (raw)
In-Reply-To: <1290087521-9123-1-git-send-email-lczerner@redhat.com>
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>
---
misc/mke2fs.c | 9 +++++----
misc/mke2fs.conf.5.in | 5 +++++
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index e000058..2b423d7 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -83,12 +83,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 = 0; /* do not use lazy inode table init */
char *bad_blocks_filename;
__u32 fs_stride;
@@ -1686,8 +1686,9 @@ static void PRS(int argc, char *argv[])
blocksize = EXT2_BLOCK_SIZE(&fs_param);
- lazy_itable_init = get_bool_from_profile(fs_types,
- "lazy_itable_init", 0);
+ 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++) {
diff --git a/misc/mke2fs.conf.5.in b/misc/mke2fs.conf.5.in
index d212947..e9913cb 100644
--- a/misc/mke2fs.conf.5.in
+++ b/misc/mke2fs.conf.5.in
@@ -360,6 +360,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
--
1.7.2.3
next prev parent reply other threads:[~2010-11-18 13:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-18 13:38 [PATCH 0/6 v2] e2fsprogs: Using discard in e2fsprogs tools Lukas Czerner
2010-11-18 13:38 ` [PATCH 1/6] e2fsprogs: Add discard function into struct_io_manager Lukas Czerner
2010-11-23 14:54 ` [1/6] " Ted Ts'o
2010-12-02 8:34 ` Lukas Czerner
2010-11-18 13:38 ` [PATCH 2/6] e2fsprogs: Add CHANNEL_FLAGS_DISCARD_ZEROES flag for io_manager Lukas Czerner
2010-11-23 14:55 ` [2/6] " Ted Ts'o
2010-11-18 13:38 ` [PATCH 3/6] e2fsck: Discard free data and inode blocks Lukas Czerner
2010-11-23 15:17 ` [3/6] " Ted Ts'o
2010-11-18 13:38 ` [PATCH 4/6] mke2fs: Deprecate -K option, introduce discard/nodiscard Lukas Czerner
2010-11-23 15:17 ` [4/6] " Ted Ts'o
2010-11-18 13:38 ` [PATCH 5/6] mke2fs: Use unix_discard() for discards Lukas Czerner
2010-11-23 15:18 ` [5/6] " Ted Ts'o
2010-11-18 13:38 ` Lukas Czerner [this message]
2010-11-23 15:18 ` [6/6] mke2fs: Add discard option into mke2fs.conf Ted Ts'o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1290087521-9123-7-git-send-email-lczerner@redhat.com \
--to=lczerner@redhat.com \
--cc=adilger@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=sandeen@redhat.com \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).