f2fs-tools/mkfs
Wang Xiaojun 1228009520 f2fs-tools: rebuild the quota inode if it is corrupted
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>
2021-07-22 10:54:37 -07:00
..
f2fs_format_main.c mkfs.f2fs: remove android features for RO 2021-06-23 08:51:30 -07: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 f2fs-tools: support multiple devices 2016-11-09 18:03:47 -08:00
f2fs_format.c f2fs-tools: rebuild the quota inode if it is corrupted 2021-07-22 10:54:37 -07:00
Makefile.am lib: pass all needed include paths to libf2fs 2020-06-18 12:34:29 -07:00