]> git.baikalelectronics.ru Git - kernel.git/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)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 3 Feb 2022 15:56:01 +0000 (10:56 -0500)
commit0fb507b63d8a34e3e22d2d536fc1c8aebd1f4785
tree6fe6f9d74d469f7bb47a18aa3994f3bb079c3e04
parent2e9313f95ae06ef37cc0f343559fc4aea6cd6fac
ext4: prevent used blocks from being allocated during fast commit replay

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
fs/ext4/ext4.h
fs/ext4/extents.c
fs/ext4/fast_commit.c