f2fs: still write data if preallocate only partial blocks
authorSheng Yong <shengyong1@huawei.com>
Wed, 22 Nov 2017 10:23:39 +0000 (18:23 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Sat, 27 Jan 2018 21:29:05 +0000 (13:29 -0800)
commitb83577043a488bce5c13d969e59b395264c2b23b
tree839dd2273a28a9b110d6a96cf60757950f8e0daa
parentb61cf217182b9dddc985e4d903dfd7f311297c51
f2fs: still write data if preallocate only partial blocks

If there is not enough space left, f2fs_preallocate_blocks may only
preallocte partial blocks. As a result, the write operation fails
but i_blocks is not 0.  To avoid this, f2fs should write data in
non-preallocation way and write as many data as the size of i_blocks.

Signed-off-by: Sheng Yong <shengyong1@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c