f2fs: split need_inplace_update
authorChao Yu <yuchao0@huawei.com>
Wed, 17 Jan 2018 08:31:38 +0000 (16:31 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Sat, 27 Jan 2018 21:30:29 +0000 (13:30 -0800)
commit1526117cdaa6299e1bcb3e955933c4ad6ebf8437
tree2672e78bd89f994c962f8eb285890c6f29d68cb1
parentcd576d7b7a95cdcb43c0955feeb49831b469b246
f2fs: split need_inplace_update

This patch splits need_inplace_update to two functions:
a. should_update_inplace() includes all conditions that we must use IPU.
b. should_update_outplace() includes all conditions that we must use OPU.

So that, in f2fs_ioc_set_pin_file() and f2fs_defragment_range(), we can
use corresponding function to check whether we can trigger OPU/IPU or not.

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