]> asedeno.scripts.mit.edu Git - linux.git/commit
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>
Wed, 3 Jan 2018 03:27:27 +0000 (19:27 -0800)
commit25006645d2e79422b6b3f26e5a82b6cbb5d49a0e
tree51175b627d73cd92af3ce2be4143f23c92a0a1d0
parentf6df8f234e2502b7d8c6de42e066e01f908318cc
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