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]
Message-Id: <1358068095-9034-1-git-send-email-wenqing.lz@taobao.com>
Date:	Sun, 13 Jan 2013 17:08:13 +0800
From:	Zheng Liu <gnehzuil.liu@...il.com>
To:	linux-ext4@...r.kernel.org
Cc:	Zheng Liu <wenqing.lz@...bao.com>
Subject: [PATCH 1/3] mke2fs: indicate bigalloc feature explicity when cluster-size is enabled

From: Zheng Liu <wenqing.lz@...bao.com>

When cluster-size is enabled without bigalloc feature, mke2fs will ignore this
argument silently.  But user might think bigalloc feature has been enabled
unless they use 'stats' command to check it in debugfs.  So now we ask user
to set bigalloc feature explicity when cluster-size is enabled.  This can
make sure that users understand what they are doing because bigalloc might
impact the performance for some workloads.

Signed-off-by: Zheng Liu <wenqing.lz@...bao.com>
---
 misc/mke2fs.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index a288147..bf4d7a2 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -1915,8 +1915,14 @@ profile_error:
 							    blocksize*16);
 		fs_param.s_log_cluster_size =
 			int_log2(cluster_size >> EXT2_MIN_CLUSTER_LOG_SIZE);
-	} else
+	} else if (cluster_size) {
+		com_err(program_name, EINVAL,
+			_("while setting clustersize; You need to enable "
+			  "bigalloc feature explicity"));
+		exit(1);
+	} else {
 		fs_param.s_log_cluster_size = fs_param.s_log_block_size;
+	}
 
 	if (inode_ratio == 0) {
 		inode_ratio = get_int_from_profile(fs_types, "inode_ratio",
-- 
1.7.12.rc2.18.g61b472e

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ