• Chao Yu's avatar
    f2fs: support file defragment · d323d005
    Chao Yu authored
    
    
    This patch introduces a new ioctl F2FS_IOC_DEFRAGMENT to support file
    defragment in a specified range of regular file.
    
    This ioctl can be used in very limited workload: if user expects high
    sequential read performance in randomly written file, this interface
    can be used for defragmentation, after that file can be written as
    continuous as possible in the device.
    
    Meanwhile, it has side-effect, it will make holes in segments where
    blocks located originally, so it's better to trigger GC to eliminate
    fragment in segments.
    Signed-off-by: default avatarChao Yu <chao2.yu@samsung.com>
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    d323d005
file.c 43.9 KB