From: Jose R. Santos Date: Mon, 22 Oct 2007 02:03:41 +0000 (-0500) Subject: Make tune2fs uninit block group aware X-Git-Tag: v1.41-WIP-0427~58 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=4e988cb4c16046c8c56dc3d76beb41466a966d81;p=tools%2Fe2fsprogs.git Make tune2fs uninit block group aware Signed-off-by: Jose R. Santos Signed-off-by: Andreas Dilger Signed-off-by: "Theodore Ts'o" --- diff --git a/misc/tune2fs.8.in b/misc/tune2fs.8.in index 8b59c17..b5af4d0 100644 --- a/misc/tune2fs.8.in +++ b/misc/tune2fs.8.in @@ -439,10 +439,17 @@ Reserve space so the block group descriptor table may grow in the future. .B Tune2fs only supports clearing this filesystem feature. +.TP +.B uninit_groups +Allow the kernel to initialize bitmaps and inode tables and keep a high +watermark for the unused inodes in a filesystem, to reduce +.BR e2fsck (8) +time. .RE .IP After setting or clearing .BR sparse_super , +.BR uninit_groups , .BR filetype , or .B resize_inode diff --git a/misc/tune2fs.c b/misc/tune2fs.c index 5a20d2f..8f5d564 100644 --- a/misc/tune2fs.c +++ b/misc/tune2fs.c @@ -118,6 +118,7 @@ static __u32 ok_features[3] = { EXT4_FEATURE_INCOMPAT_FLEX_BG, /* R/O compat */ EXT2_FEATURE_RO_COMPAT_LARGE_FILE | + EXT4_FEATURE_RO_COMPAT_GDT_CSUM | EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER }; @@ -130,7 +131,8 @@ static __u32 clear_ok_features[3] = { EXT2_FEATURE_INCOMPAT_FILETYPE | EXT4_FEATURE_INCOMPAT_FLEX_BG, /* R/O compat */ - EXT2_FEATURE_RO_COMPAT_LARGE_FILE + EXT2_FEATURE_RO_COMPAT_LARGE_FILE | + EXT4_FEATURE_RO_COMPAT_GDT_CSUM }; /* @@ -245,6 +247,7 @@ static int release_blocks_proc(ext2_filsys fs, blk_t *blocknr, ext2fs_unmark_block_bitmap(fs->block_map,block); group = ext2fs_group_of_blk(fs, block); fs->group_desc[group].bg_free_blocks_count++; + ext2fs_group_desc_csum_set(fs, group); fs->super->s_free_blocks_count++; return 0; } @@ -409,6 +412,8 @@ static void update_feature_set(ext2_filsys fs, char *features) if (FEATURE_CHANGED(E2P_FEATURE_RO_INCOMPAT, EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER) || + FEATURE_CHANGED(E2P_FEATURE_RO_INCOMPAT, + EXT4_FEATURE_RO_COMPAT_GDT_CSUM) || FEATURE_CHANGED(E2P_FEATURE_INCOMPAT, EXT2_FEATURE_INCOMPAT_FILETYPE) || FEATURE_CHANGED(E2P_FEATURE_COMPAT,