summaryrefslogtreecommitdiffstats
path: root/fs/ext4/resize.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2012-09-12 14:32:42 -0400
committerTheodore Ts'o <tytso@mit.edu>2012-09-12 14:32:42 -0400
commit93f9052643409c13b3b5f76833865087351f55b8 (patch)
tree5f404f0f613067c414c9baa95ef3f0de753ea85b /fs/ext4/resize.c
parent01f795f9e0d67adeccc61a8b20c28acb45fa5fd8 (diff)
downloadlinux-93f9052643409c13b3b5f76833865087351f55b8.tar.bz2
ext4: set bg_itable_unused when resizing
Set bg_itable_unused for file systems that have uninit_bg enabled. This will speed up the first e2fsck run after the file system is resized. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/resize.c')
-rw-r--r--fs/ext4/resize.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index 7adc08854588..a5be589c85bc 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -1268,6 +1268,9 @@ static int ext4_setup_new_descs(handle_t *handle, struct super_block *sb,
ext4_free_group_clusters_set(sb, gdp,
EXT4_B2C(sbi, group_data->free_blocks_count));
ext4_free_inodes_set(sb, gdp, EXT4_INODES_PER_GROUP(sb));
+ if (ext4_has_group_desc_csum(sb))
+ ext4_itable_unused_set(sb, gdp,
+ EXT4_INODES_PER_GROUP(sb));
gdp->bg_flags = cpu_to_le16(*bg_flags);
ext4_group_desc_csum_set(sb, group, gdp);