fsck.f2fs: introduce -p option to check meta
authorSheng Yong <shengyong1@huawei.com>
Mon, 14 Mar 2016 06:16:53 +0000 (14:16 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 22 Mar 2016 21:10:00 +0000 (14:10 -0700)
commit6e225697bda9459ffb62d0bcccc545193cc9ecdf
tree768af8e624ef040c65173392c8fd60758492dca6
parent759df520ae0be9753b5ccf095a6ea19d45d09c01
fsck.f2fs: introduce -p option to check meta

This patch introduces a new option '-p' to do more checks on NAT/SIT areas.
'-p' has 2 levels: level 1 has the same sematics as '-a'; level 2 checks
NAT/SIT counters to see if they matches the status in SB and CP.

A new function, fsck_chk_meta, is called by '-p 1' to implement these
comparsion. If errors are detected, fix_on is set, which means fsck will
do a 'fsck -f' immediately.

Signed-off-by: Sheng Yong <shengyong1@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fsck/fsck.c
fsck/fsck.h
fsck/main.c
fsck/mount.c
include/f2fs_fs.h