lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 21 Sep 2020 16:16:02 -0600
From:   adilger@...mcloud.com
To:     tytso@....edu
Cc:     linux-ext4@...r.kernel.org, Andreas Dilger <adilger@...mcloud.com>,
        Andreas Dilger <adilger@...ger.ca>
Subject: [PATCH] e2fsck: skip extent optimization by default

From: Andreas Dilger <adilger@...mcloud.com>

The e2fsck error message:

    inode nnn extent tree (at level 1) could be narrower. Optimize<y>?

can be fairly verbose at times, and leads users to think that there
may be something wrong with the filesystem.  Basically, almost any
message printed by e2fsck makes users nervous when they are facing
other corruption, and a few thousand of these printed may hide other
errors.  It also isn't clear that saving a few blocks optimizing the
extent tree noticeably improves performance.

This message has previously been annoying enough for Ted to add the
"-E no_optimize_extents" option to disable it.  Just enable this
option by default, similar to the "-D" directory optimization option.

Signed-off-by: Andreas Dilger <adilger@...ger.ca>
---
 e2fsck/e2fsck.8.in | 4 ++--
 e2fsck/unix.c      | 7 +++++++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/e2fsck/e2fsck.8.in b/e2fsck/e2fsck.8.in
index 4e3890b..4f5086a 100644
--- a/e2fsck/e2fsck.8.in
+++ b/e2fsck/e2fsck.8.in
@@ -228,12 +228,12 @@ exactly the opposite of discard option. This is set as default.
 .TP
 .BI no_optimize_extents
 Do not offer to optimize the extent tree by eliminating unnecessary
-width or depth.  This can also be enabled in the options section of
+width or depth.  This is the default unless otherwise specified in
 .BR /etc/e2fsck.conf .
 .TP
 .BI optimize_extents
 Offer to optimize the extent tree by eliminating unnecessary
-width or depth.  This is the default unless otherwise specified in
+width or depth.  This can also be enabled in the options section of
 .BR /etc/e2fsck.conf .
 .TP
 .BI inode_count_fullmap
diff --git a/e2fsck/unix.c b/e2fsck/unix.c
index 1b7ccea..445f806 100644
--- a/e2fsck/unix.c
+++ b/e2fsck/unix.c
@@ -840,6 +840,8 @@ static errcode_t PRS(int argc, char *argv[], e2fsck_t *ret_ctx)
 	else
 		ctx->program_name = "e2fsck";
 
+	ctx->options |= E2F_OPT_NOOPT_EXTENTS;
+
 	phys_mem_kb = get_memory_size() / 1024;
 	ctx->readahead_kb = ~0ULL;
 	while ((c = getopt(argc, argv, "panyrcC:B:dE:fvtFVM:b:I:j:P:l:L:N:SsDkz:")) != EOF)
@@ -1051,6 +1053,11 @@ static errcode_t PRS(int argc, char *argv[], e2fsck_t *ret_ctx)
 	if (c)
 		ctx->options |= E2F_OPT_NOOPT_EXTENTS;
 
+	profile_get_boolean(ctx->profile, "options", "optimize_extents",
+			    0, 0, &c);
+	if (c)
+		ctx->options &= ~E2F_OPT_NOOPT_EXTENTS;
+
 	profile_get_boolean(ctx->profile, "options", "inode_count_fullmap",
 			    0, 0, &c);
 	if (c)
-- 
1.7.12.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ