mirror of https://github.com/vitalif/e2fsprogs
mke2fs: Make argument to the extended option lazy_itable_init optional
Also remove some debugging printf's left over from a previous patch. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>bitmap-optimize
parent
da292aa9af
commit
43781b9459
|
@ -205,14 +205,15 @@ parity in a RAID stripe if possible when the data is written.
|
|||
Reserve enough space so that the block group descriptor table can grow
|
||||
to support a filesystem that has max-online-resize blocks.
|
||||
.TP
|
||||
.B lazy_itable_init= \fI<0 to disable, 1 to enable>
|
||||
.B lazy_itable_init\fR[\fb= \fI<0 to disable, 1 to enable>\fR]
|
||||
If enabled and the uninit_bg feature is enabled, the inode table will
|
||||
not fully initialized by
|
||||
.BR mke2fs .
|
||||
This speeds up filesystem
|
||||
initialization noitceably, but it requires the kernel to finish
|
||||
initializing the filesystem in the background when the filesystem is
|
||||
first mounted.
|
||||
first mounted. If the option value is omitted, it defaults to 1 to
|
||||
enable lazy inode table initialization.
|
||||
.TP
|
||||
.B test_fs
|
||||
Set a flag in the filesystem superblock indicating that it may be
|
||||
|
|
|
@ -423,14 +423,11 @@ static void write_inode_tables(ext2_filsys fs, int lazy_flag)
|
|||
|
||||
if (lazy_flag) {
|
||||
ipb = fs->blocksize / EXT2_INODE_SIZE(fs->super);
|
||||
printf("bg %i, num %d, ipb %d, unused %d ",
|
||||
i, num, ipb, fs->group_desc[i].bg_itable_unused);
|
||||
num = ((((fs->super->s_inodes_per_group -
|
||||
fs->group_desc[i].bg_itable_unused) *
|
||||
EXT2_INODE_SIZE(fs->super)) +
|
||||
EXT2_BLOCK_SIZE(fs->super) - 1) /
|
||||
EXT2_BLOCK_SIZE(fs->super));
|
||||
printf("new num %d\n", num);
|
||||
} else {
|
||||
/* The kernel doesn't need to zero the itable blocks */
|
||||
fs->group_desc[i].bg_flags |= EXT2_BG_INODE_ZEROED;
|
||||
|
@ -843,12 +840,10 @@ static void parse_extended_opts(struct ext2_super_block *param,
|
|||
} else if (!strcmp(token, "test_fs")) {
|
||||
param->s_flags |= EXT2_FLAGS_TEST_FILESYS;
|
||||
} else if (!strcmp(token, "lazy_itable_init")) {
|
||||
if (!arg) {
|
||||
r_usage++;
|
||||
badopt = token;
|
||||
continue;
|
||||
}
|
||||
if (arg)
|
||||
lazy_itable_init = strtoul(arg, &p, 0);
|
||||
else
|
||||
lazy_itable_init = 1;
|
||||
} else {
|
||||
r_usage++;
|
||||
badopt = token;
|
||||
|
|
Loading…
Reference in New Issue