]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: support in batch fzero in dnode page
authorChao Yu <yuchao0@huawei.com>
Mon, 9 May 2016 11:56:31 +0000 (19:56 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 11 May 2016 16:56:36 +0000 (09:56 -0700)
commitc8ebb3fc5958ad16bb2e0cba3515f8dd4a317607
tree0e026991b79762ea8ed14aa4f537e049a6deded6
parenteed309d3e0b91bbb79b83c3c1c00a8545d6cf2a1
f2fs: support in batch fzero in dnode page

This patch tries to speedup fzero_range by making space preallocation and
address removal of blocks in one dnode page as in batch operation.

In virtual machine, with zram driver:

dd if=/dev/zero of=/mnt/f2fs/file bs=1M count=4096
time xfs_io -f /mnt/f2fs/file -c "fzero 0 4096M"

Before:
real 0m3.276s
user 0m0.008s
sys 0m3.260s

After:
real 0m1.568s
user 0m0.000s
sys 0m1.564s

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