ext4: regenerate buddy after block freeing failed if under fc replay
[ Upstream commit c9b528c3 ] 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:Jan Kara <jack@suse.cz> Fixes: 6bd97bf2 ("ext4: remove redundant mb_regenerate_buddy()") Signed-off-by:
Baokun Li <libaokun1@huawei.com> Reviewed-by:
Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20240104142040.2835097-4-libaokun1@huawei.com Signed-off-by:
Theodore Ts'o <tytso@mit.edu> Signed-off-by:
Sasha Levin <sashal@kernel.org>
parent
f1bb7048
Please register or sign in to comment