]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
f2fs: support file defragment
authorChao Yu <chao2.yu@samsung.com>
Tue, 27 Oct 2015 01:53:45 +0000 (09:53 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 4 Dec 2015 19:52:33 +0000 (11:52 -0800)
commitd323d005ac4a2d413128267af76bb9d71f7303da
tree8925a675afb9e088fbb83a3c229399c9f7bbf9b9
parent2da3e027461ab0148384b02bd5905f1a7b335dff
f2fs: support file defragment

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: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c
fs/f2fs/f2fs.h
fs/f2fs/file.c