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>
Fri, 19 Jan 2018 06:09:08 +0000 (22:09 -0800)
commit25a912e51af7c0761a6d3424640901ded517e201
tree93d2e1ed682a596091dcf7709f89d3a65bdbf966
parentf1d2564a7cc9d2f49399094cfe3c46c9d4930b7b
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