linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] mke2fs: indicate bigalloc feature explicity when cluster-size is enabled
@ 2013-01-13  9:08 Zheng Liu
  2013-01-13  9:08 ` [PATCH 2/3] mke2fs: reduce the range of cluster-size Zheng Liu
                   ` (2 more replies)
  0 siblings, 3 replies; 32+ messages in thread
From: Zheng Liu @ 2013-01-13  9:08 UTC (permalink / raw)
  To: linux-ext4; +Cc: Zheng Liu

From: Zheng Liu <wenqing.lz@taobao.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@taobao.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


^ permalink raw reply related	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2013-01-16  1:35 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-13  9:08 [PATCH 1/3] mke2fs: indicate bigalloc feature explicity when cluster-size is enabled Zheng Liu
2013-01-13  9:08 ` [PATCH 2/3] mke2fs: reduce the range of cluster-size Zheng Liu
2013-01-14 17:41   ` Andreas Dilger
2013-01-14 21:03   ` Theodore Ts'o
2013-01-14 21:07     ` Andreas Dilger
2013-01-14 21:10       ` Theodore Ts'o
2013-01-15  0:37         ` [PATCH 1/5] mke2fs: enforce that the cluster size must be less that the block size Theodore Ts'o
2013-01-15  0:37           ` [PATCH 2/5] mke2fs: the -g option will now specify the clusters per block group Theodore Ts'o
2013-01-15 15:10             ` Eric Sandeen
2013-01-15 19:05               ` Theodore Ts'o
2013-01-15 15:22             ` Zheng Liu
2013-01-15  0:37           ` [PATCH 3/5] libe2p: teach parse_num_blocks2() to return bytes if log_block_size < 0 Theodore Ts'o
2013-01-15 15:23             ` Zheng Liu
2013-01-15  0:37           ` [PATCH 4/5] mke2fs: teach mke2fs to understand -b 4k and -C 256M Theodore Ts'o
2013-01-15 15:11             ` Eric Sandeen
2013-01-15 15:13               ` Eric Sandeen
2013-01-15 15:24             ` Zheng Liu
2013-01-15  0:37           ` [PATCH 5/5] libext2fs: avoid 32-bit overflow in ext2fs_initialize with a 512M cluster size Theodore Ts'o
2013-01-15 15:33             ` Zheng Liu
2013-01-15 15:36               ` Zheng Liu
2013-01-15 19:10               ` Theodore Ts'o
2013-01-16  1:49                 ` Zheng Liu
2013-01-15  0:41           ` [PATCH 1/5] mke2fs: enforce that the cluster size must be less that the block size Theodore Ts'o
2013-01-15 15:22             ` Zheng Liu
2013-01-13  9:08 ` [PATCH 3/3] mke2fs: document bigalloc and cluster-size Zheng Liu
2013-01-15  3:10   ` Theodore Ts'o
2013-01-15 19:12     ` Theodore Ts'o
2013-01-15 19:46       ` Phillip Susi
2013-01-15 19:57         ` Theodore Ts'o
2013-01-15 20:38           ` Phillip Susi
2013-01-15 22:28             ` Theodore Ts'o
2013-01-14 20:28 ` [PATCH 1/3] mke2fs: indicate bigalloc feature explicity when cluster-size is enabled Theodore Ts'o

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).