Patch "ext4: add a hint for block bitmap corrupt state in mb_groups" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ext4: add a hint for block bitmap corrupt state in mb_groups

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ext4-add-a-hint-for-block-bitmap-corrupt-state-in-mb.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit be414445c4b586f871ce544630f6ad5e64627f54
Author: Zhang Yi <yi.zhang@xxxxxxxxxx>
Date:   Fri Jan 19 14:11:54 2024 +0800

    ext4: add a hint for block bitmap corrupt state in mb_groups
    
    [ Upstream commit 68ee261fb15457ecb17e3683cb4e6a4792ca5b71 ]
    
    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@xxxxxxxxxx>
    Reviewed-by: Jan Kara <jack@xxxxxxx>
    Link: https://lore.kernel.org/r/20240119061154.1525781-1-yi.zhang@xxxxxxxxxxxxxxx
    Signed-off-by: Theodore Ts'o <tytso@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index d13d669f90fd5..8dba416aa6c1e 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2950,7 +2950,10 @@ static int ext4_mb_seq_groups_show(struct seq_file *seq, void *v)
 	for (i = 0; i <= 13; i++)
 		seq_printf(seq, " %-5u", i <= blocksize_bits + 1 ?
 				sg.info.bb_counters[i] : 0);
-	seq_puts(seq, " ]\n");
+	seq_puts(seq, " ]");
+	if (EXT4_MB_GRP_BBITMAP_CORRUPT(&sg.info))
+		seq_puts(seq, " Block bitmap corrupted!");
+	seq_puts(seq, "\n");
 
 	return 0;
 }




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux