aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZheng Liu <wenqing.lz@taobao.com>2013-01-13 17:08:13 +0800
committerTheodore Ts'o <tytso@mit.edu>2013-01-14 16:54:09 -0500
commit9cf69bb825c2995352502f48ea64d1be1d263995 (patch)
tree6e03f6a2cde4e2bed3481b4e3bfbabc0531dfe7c
parent9e85208e84bbdea9cfe6e8887502a1c4d92efbe5 (diff)
downloade2fsprogs-9cf69bb825c2995352502f48ea64d1be1d263995.tar.gz
e2fsprogs-9cf69bb825c2995352502f48ea64d1be1d263995.tar.xz
e2fsprogs-9cf69bb825c2995352502f48ea64d1be1d263995.zip
mke2fs: require the bigalloc feature explicity if the cluster size is set
When cluster-size is specified without the bigalloc feature, mke2fs will ignore this argument silently. But user might think bigalloc feature has been enabled unless they use the dumpe2fs command. 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@taobao.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
-rw-r--r--misc/mke2fs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index 32b4c34e..4748f4ab 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -1847,6 +1847,11 @@ profile_error:
blocksize*16);
fs_param.s_log_cluster_size =
int_log2(cluster_size >> EXT2_MIN_CLUSTER_LOG_SIZE);
+ } else if (cluster_size) {
+ com_err(program_name, 0,
+ _("specifying a cluster size requires the "
+ "bigalloc feature"));
+ exit(1);
} else
fs_param.s_log_cluster_size = fs_param.s_log_block_size;