• Chao Yu's avatar
    f2fs: allow out-place-update for direct IO in LFS mode · f847c699
    Chao Yu authored
    Normally, DIO uses in-pllace-update, but in LFS mode, f2fs doesn't
    allow triggering any in-place-update writes, so we fallback direct
    write to buffered write, result in bad performance of large size
    write.
    
    This patch adds to support triggering out-place-update for direct IO
    to enhance its performance.
    
    Note that it needs to exclude direct read IO during direct write,
    since new data writing to new block address will no be valid until
    write finished.
    
    storage: zram
    
    time xfs_io -f -d /mnt/f2fs/file -c "pwrite 0 1073741824" -c "fsync"
    
    Before:
    real	0m13.061s
    user	0m0.327s
    sys	0m12.486s
    
    After:
    real	0m6.448s
    user	0m0.228s
    sys	0m6.212s
    Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    f847c699
f2fs.h 111 KB