Skip to content

Commit 68ee261

Browse files
zhangyi089tytso
authored andcommitted
ext4: add a hint for block bitmap corrupt state in mb_groups
If one group is marked as block bitmap corrupted, its free blocks cannot be used and its free count is also deducted from the global sbi->s_freeclusters_counter. User might be confused about the absent free space because we can't query the information about corrupted block groups except unreliable error messages in syslog. So add a hint to show block bitmap corrupted groups in mb_groups. Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20240119061154.1525781-1-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent 547e64b commit 68ee261

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

fs/ext4/mballoc.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3059,7 +3059,10 @@ static int ext4_mb_seq_groups_show(struct seq_file *seq, void *v)
30593059
for (i = 0; i <= 13; i++)
30603060
seq_printf(seq, " %-5u", i <= blocksize_bits + 1 ?
30613061
sg.info.bb_counters[i] : 0);
3062-
seq_puts(seq, " ]\n");
3062+
seq_puts(seq, " ]");
3063+
if (EXT4_MB_GRP_BBITMAP_CORRUPT(&sg.info))
3064+
seq_puts(seq, " Block bitmap corrupted!");
3065+
seq_puts(seq, "\n");
30633066

30643067
return 0;
30653068
}

0 commit comments

Comments
 (0)