third_party_f2fs-tools/mkfs
Wang Xiaojun cdca0b4dff f2fs-tools: rebuild the quota inode if it is corrupted
commit 1228009520
category: bugfix
issue: #I6VAS0
CVE: NA

Signed-off-by: DongSenhao <dongsenhao2@huawei.com>
---------------------------------------

If the following process returns an error,
the quota inode, not the quota file, is damaged.
(fsck_chk_quota_node-->fsck_chk_node_blk-->sanity_check_nid)
The fsck does not have a process to rebuild the quota inode.

Because sanity_check_nid is not passed, fsck->nat_area_bitmap
can not be cleared, and then the NAT of quota will be nullify
during fix_nat_entries.

During the next fsck check, the quota inode check fails
because the address of the quota inode changes to 0.
In addition, in fsck_chk_quota_files-->f2fs_filesize_update,
data is written to address 0.

Therefore, when the quota inode is corrupted, we need to rebuild it.

Signed-off-by: Wang Xiaojun <wangxiaojun11@huawei.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: dongsenhao <dongsenhao2@huawei.com>
2023-04-13 14:13:46 +08:00
..
BUILD.gn f2fs_tools部件化 2022-08-23 10:40:59 +08:00
f2fs_format_main.c mkfs.f2fs: remove android features for RO 2023-04-13 14:13:45 +08:00
f2fs_format_utils.c mkfs.f2fs: check zeros in first 16MB for Android 2019-08-27 14:51:05 -07:00
f2fs_format_utils.h Build successful,add one config.h and four BUILD.gn, modify seven files to relsove macro redefined,.Delete two Android.bp files.Add OAT related files,OAT.xml,README.OpenSource and README.md. 2021-12-15 10:45:47 +08:00
f2fs_format.c f2fs-tools: rebuild the quota inode if it is corrupted 2023-04-13 14:13:46 +08:00
Makefile.am lib: pass all needed include paths to libf2fs 2020-06-18 12:34:29 -07:00