diff options
author | Yunlong Song <yunlong.song@huawei.com> | 2018-01-04 10:02:02 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2018-01-17 02:39:57 +0300 |
commit | 2c1905042c8c3da45ec347d5397d1133ff30fce4 (patch) | |
tree | d0decd9b42d414c7b1cd26c27f3492ed0cd60ac0 /fs/f2fs/super.c | |
parent | 1eca05aa9d4d107a6f9e434b5041a775327a8a4b (diff) | |
download | linux-2c1905042c8c3da45ec347d5397d1133ff30fce4.tar.xz |
f2fs: check segment type in __f2fs_replace_block
In some case, the node blocks has wrong blkaddr whose segment type is
NODE, e.g., recover inode has missing xattr flag and the blkaddr is in
the xattr range. Since fsck.f2fs does not check the recovery nodes, this
will cause __f2fs_replace_block change the curseg of node and do the
update_sit_entry(sbi, new_blkaddr, 1) with no next_blkoff refresh, as a
result, when recovery process write checkpoint and sync nodes, the
next_blkoff of curseg is used in the segment bit map, then it will
cause f2fs_bug_on. So let's check segment type in __f2fs_replace_block.
Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
0 files changed, 0 insertions, 0 deletions