fsck.f2fs: Fix slow fsck in auto-fix mode

Split f2fs_init_nid_bitmap() into two disjoint parts:
	f2fs_early_init_nid_bitmap(), and
	f2fs_late_init_nid_bitmap(),
where f2fs_late_init_nid_bitmap() won't be called in auto-fix mode, when
no errors were found.

f2fs_late_init_nid_bitmap() contains the loop to create NID bitmap from
NAT. which is the main reason for slow fsck.

Bug: 157471256
Test: on an arbitrary f2fs image (before and after this patch)
Signed-off-by: Robin Hsu <robinhsu@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Change-Id: Ic41a9c8e19b1db0bfacbb55c73c3c977e6db3c31
Merged-In: I1dce1039bc01641f7c33875a1cfe20943cdc42ac
1 file changed