]> git.itanic.dy.fi Git - linux-stable/commit
ext4: prevent used blocks from being allocated during fast commit replay
authorXin Yin <yinxin.x@bytedance.com>
Mon, 10 Jan 2022 03:51:40 +0000 (11:51 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Feb 2022 17:35:19 +0000 (18:35 +0100)
commit33fb59317cd2021c3f5b95ba57fdf7c43f864b68
treefa322eac6166feff7c1de6691be6046daa9b9348
parent11dfe20342f0befa5a9083f6761552d7688adb92
ext4: prevent used blocks from being allocated during fast commit replay

commit 599ea31d13617c5484c40cdf50d88301dc351cfc upstream.

During fast commit replay procedure, we clear inode blocks bitmap in
ext4_ext_clear_bb(), this may cause ext4_mb_new_blocks_simple() allocate
blocks still in use.

Make ext4_fc_record_regions() also record physical disk regions used by
inodes during replay procedure. Then ext4_mb_new_blocks_simple() can
excludes these blocks in use.

Signed-off-by: Xin Yin <yinxin.x@bytedance.com>
Link: https://lore.kernel.org/r/20220110035141.1980-2-yinxin.x@bytedance.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/ext4.h
fs/ext4/extents.c
fs/ext4/fast_commit.c