Move check_resize_inode() out of check_super_block(), since we only
need to test the resize_inode for correctness only if the filesystem
requires checking. This change avoids a lot of I/O operations which
slows down a 1 second boot.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
/* super.c */
void check_super_block(e2fsck_t ctx);
int check_backup_super_block(e2fsck_t ctx);
+void check_resize_inode(e2fsck_t ctx);
/* util.c */
extern void *e2fsck_allocate_memory(e2fsck_t ctx, unsigned int size,
* resize inode should be cleared) as well as the case where on-line
* resizing is enabled.
*/
-static void check_resize_inode(e2fsck_t ctx)
+void check_resize_inode(e2fsck_t ctx)
{
ext2_filsys fs = ctx->fs;
struct ext2_inode inode;
fs->flags &= ~EXT2_FLAG_MASTER_SB_ONLY;
}
- check_resize_inode(ctx);
-
/*
* Clean up any orphan inodes, if present.
*/
if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
fatal_error(ctx, 0);
check_if_skip(ctx);
+ check_resize_inode(ctx);
if (bad_blocks_file)
read_bad_blocks_file(ctx, bad_blocks_file, replace_bad_blocks);
else if (cflag)