[PATCH 1/3] mke2fs: indicate bigalloc feature explicity when cluster-size is enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Zheng Liu <wenqing.lz@xxxxxxxxxx>

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@xxxxxxxxxx>
---
 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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux