f2fs: fix to caclulate required free section correctly
authorChao Yu <yuchao0@huawei.com>
Wed, 10 Jan 2018 10:18:51 +0000 (18:18 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Sat, 27 Jan 2018 21:30:08 +0000 (13:30 -0800)
commitb9eedb48132e259fec06d6245783d759f3a972c3
tree3d911b072a7333b4b0497650fe4bbd609cdd6805
parent75ae50cf1539b981dad0e86a2a46532cbfc10d87
f2fs: fix to caclulate required free section correctly

When calculating required free section during file defragmenting, we
should skip holes in file, otherwise we will probably fail to defrag
sparse file with large size.

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