static void PRS(int argc, char *argv[])
{
int b, c;
- int size;
+ int cluster_size = 0;
char *tmp, **cpp;
int blocksize = 0;
int inode_ratio = 0;
cflag++;
break;
case 'C':
- size = strtoul(optarg, &tmp, 0);
- if (size < EXT2_MIN_CLUSTER_SIZE ||
- size > EXT2_MAX_CLUSTER_SIZE || *tmp) {
+ cluster_size = strtoul(optarg, &tmp, 0);
+ if (cluster_size < EXT2_MIN_CLUSTER_SIZE ||
+ cluster_size > EXT2_MAX_CLUSTER_SIZE || *tmp) {
com_err(program_name, 0,
_("invalid fragment size - %s"),
optarg);
exit(1);
}
- fs_param.s_log_cluster_size =
- int_log2(size >> EXT2_MIN_CLUSTER_LOG_SIZE);
break;
case 'g':
fs_param.s_blocks_per_group = strtoul(optarg, &tmp, 0);
fs_param.s_log_block_size =
int_log2(blocksize >> EXT2_MIN_BLOCK_LOG_SIZE);
if (fs_param.s_feature_ro_compat & EXT4_FEATURE_RO_COMPAT_BIGALLOC) {
- if (fs_param.s_log_cluster_size == 0)
- fs_param.s_log_cluster_size =
- fs_param.s_log_block_size + 4;
+ if (!cluster_size)
+ cluster_size = get_int_from_profile(fs_types,
+ "cluster_size",
+ blocksize*4);
+ fs_param.s_log_cluster_size =
+ int_log2(cluster_size >> EXT2_MIN_CLUSTER_LOG_SIZE);
} else
fs_param.s_log_cluster_size = fs_param.s_log_block_size;
This relation is a boolean which specifies whether the
.BR mke2fs (8)
should attempt to discard device prior to filesystem creation.
+.TP
+.I cluster_size
+This relation specifies the default cluster size if the bigalloc file
+system feature is enabled. It can be overridden via the
+.B \-C
+command line option to
+.BR mke2fs (8)
.SH THE [devices] STANZA
Each tag in the
.I [devices]