@@ -1431,6 +1431,7 @@ static void ext4_update_super(struct super_block *sb,
* Update the fs overhead information
*/
ext4_calculate_overhead(sb);
+ es->s_overhead_clusters = cpu_to_le32(sbi->s_overhead);
if (test_opt(sb, DEBUG))
printk(KERN_DEBUG "EXT4-fs: added group %u:"
@@ -4467,6 +4467,10 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
err = ext4_calculate_overhead(sb);
if (err)
goto failed_mount_wq;
+ if (!sb_rdonly(sb)) {
+ es->s_overhead_clusters = cpu_to_le32(sbi->s_overhead);
+ ext4_commit_super(sb, 1);
+ }
}
/*
Store the overhead in super block so we don't have to calculate again during next mount. It also gets updated after online resizing. Signed-off-by: Li Dongyang <dongyangli@ddn.com> --- fs/ext4/resize.c | 1 + fs/ext4/super.c | 4 ++++ 2 files changed, 5 insertions(+)