mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-22 17:01:14 +00:00
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>
This commit is contained in:
parent
01f795f9e0
commit
93f9052643
1 changed files with 3 additions and 0 deletions
|
@ -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_free_group_clusters_set(sb, gdp,
|
||||||
EXT4_B2C(sbi, group_data->free_blocks_count));
|
EXT4_B2C(sbi, group_data->free_blocks_count));
|
||||||
ext4_free_inodes_set(sb, gdp, EXT4_INODES_PER_GROUP(sb));
|
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);
|
gdp->bg_flags = cpu_to_le16(*bg_flags);
|
||||||
ext4_group_desc_csum_set(sb, group, gdp);
|
ext4_group_desc_csum_set(sb, group, gdp);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue