Skip to content
Commit c9b528c3 authored by Baokun Li's avatar Baokun Li Committed by Theodore Ts'o
Browse files

ext4: regenerate buddy after block freeing failed if under fc replay



This mostly reverts commit 6bd97bf2 ("ext4: remove redundant
mb_regenerate_buddy()") and reintroduces mb_regenerate_buddy(). Based on
code in mb_free_blocks(), fast commit replay can end up marking as free
blocks that are already marked as such. This causes corruption of the
buddy bitmap so we need to regenerate it in that case.

Reported-by: default avatarJan Kara <jack@suse.cz>
Fixes: 6bd97bf2 ("ext4: remove redundant mb_regenerate_buddy()")
Signed-off-by: default avatarBaokun Li <libaokun1@huawei.com>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20240104142040.2835097-4-libaokun1@huawei.com


Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 17220215
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment