2001-01-14 Theodore Ts'o <tytso@valinux.com>
+ * mke2fs.c: Add new filesystem types, largefile and largefile4,
+ for those filesystems whose average inode size is 1MB and
+ 4MB, respectively. Allow the inode ratio specified to be
+ has high as 4MB. Make the s_max_mount_count vary between
+ 20 and 40, to avoid needing to check all of the
+ filesystems at the same time. Add some random jitter to
+ the s_max_mount_count value so that we avoid checking all
+ of the filesystems at the same time when we reboot.
+
* tune2fs.8.in: Add description of the -j option.
* tune2fs.c (add_journal): Minor fixes from Andreas Dilger. Flush
.TP
.BI \-T " fs-type"
Specify how the filesystem is going to be used, so that mke2fs can
-automatically determine the optimal filesystem parameters. The only
-filesystem type which is currently supported is "news".
+chose optimal filesystem parameters for that use. The only
+currently supported filesystem types are:
+.BR news ,
+which reserves space for one inode per 4kb block,
+.BR largefile
+which allocates one inode per megabyte, and
+.BR largefile4
+which allocates one inode per 4 megabytes.
.TP
.B \-V
Print the version number of
{ default_str, 512, 1024, 4096 },
{ default_str, 3, 1024, 8192 },
{ "news", 0, 4096, 4096 },
+ { "largefile", 0, 4096, 1024 * 1024 },
+ { "largefile4", 0, 4096, 4096 * 1024 },
{ 0, 0, 0, 0},
};
break;
case 'i':
inode_ratio = strtoul(optarg, &tmp, 0);
- if (inode_ratio < 1024 || inode_ratio > 256 * 1024 ||
+ if (inode_ratio < 1024 || inode_ratio > 4096 * 1024 ||
*tmp) {
com_err(program_name, 0,
_("bad inode ratio - %s"), optarg);
ext2_filsys fs;
badblocks_list bb_list = 0;
int journal_blocks;
+ int i, val;
#ifdef ENABLE_NLS
setlocale(LC_MESSAGES, "");
uuid_generate(fs->super->s_uuid);
/*
+ * Add "jitter" to the superblock's check interval so that we
+ * don't check all the filesystems at the same time. We use a
+ * kludgy hack of using the UUID to derive a random jitter value.
+ */
+ for (i = 0, val = 0 ; i < sizeof(fs->super->s_uuid); i++)
+ val += fs->super->s_uuid[i];
+ fs->super->s_max_mnt_count += val % EXT2_DFL_MAX_MNT_COUNT;
+
+ /*
* Override the creator OS, if applicable
*/
if (creator_os && !set_os(fs->super, creator_os)) {