f2fs: don't interrupt free nids building during nid allocation
authorChao Yu <yuchao0@huawei.com>
Tue, 11 Oct 2016 14:31:35 +0000 (22:31 +0800)
committerJaegeuk Kim <jaegeuk@google.com>
Mon, 25 Sep 2017 22:05:30 +0000 (15:05 -0700)
commite07f457ef777a1af0642b81af98b1e824748b265
tree4607e772bd391058cd7f798c1b4f00936ab3e8d2
parent6a248819a280ff0c72ef4d9943ead88d7d6de0cb
f2fs: don't interrupt free nids building during nid allocation

commit 3a2ad5672bb36ee9c07bab97dadc8b0f70d391f4 upstream.

Let build_free_nids support sync/async methods, in allocation flow of nids,
we use synchronuous method, so that we can avoid looping in alloc_nid when
free memory is low; in unblock_operations and f2fs_balance_fs_bg we use
asynchronuous method in where low memory condition can interrupt us.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/checkpoint.c
fs/f2fs/f2fs.h
fs/f2fs/node.c
fs/f2fs/segment.c