• Chao Yu's avatar
    f2fs: support in batch multi blocks preallocation · 46008c6d
    Chao Yu authored
    This patch introduces reserve_new_blocks to make preallocation of multi
    blocks as in batch operation, so it can avoid lots of redundant
    operation, result in better performance.
    
    In virtual machine, with rotational device:
    
    time fallocate -l 32G /mnt/f2fs/file
    
    Before:
    real	0m4.584s
    user	0m0.000s
    sys	0m4.580s
    
    After:
    real	0m0.292s
    user	0m0.000s
    sys	0m0.272s
    
    In x86, with SSD:
    
    time fallocate -l 500G $MNT/testfile
    
    Before : 24.758 s
    After  :  1.604 s
    Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
    [Jaegeuk Kim: fix bugs and add performance numbers measured in x86.]
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    46008c6d
data.c 43.4 KB