f2fs: keep scanning until enough free nids are acquired
authorFan Li <fanofcode.li@samsung.com>
Tue, 7 Nov 2017 03:04:33 +0000 (11:04 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 19 Dec 2017 03:38:32 +0000 (19:38 -0800)
commit221656e4b864bf37e0ff117222e5b6d2de9ecf05
treead4fc2758d79d2009494cc5aa5758a1659692c80
parent0b0a1e72b5d51e6b2fca404e709af999f616ce83
f2fs: keep scanning until enough free nids are acquired

In current version, after scan_free_nid_bits, the scan is over if
nid_cnt[FREE_NID] != 0. In most cases, there are still free nids in the
free list during the scan, and scan_free_nid_bits usually can't increase
nid_cnt[FREE_NID]. It causes that __build_free_nids is called many times
without solving the shortage of the free nids. This patch fixes that.

Signed-off-by: Fan li <fanofcode.li@samsung.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/node.c