]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: add new ioctl F2FS_IOC_GARBAGE_COLLECT
authorChao Yu <chao2.yu@samsung.com>
Fri, 10 Jul 2015 10:08:10 +0000 (18:08 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 4 Aug 2015 21:09:58 +0000 (14:09 -0700)
commit59b473e77666d3a25f8ca3ce007896355c56b067
tree47b6b96952253ebe3b4f891494aa6802ec0a4c9f
parentd452f0cf2777d40942a148d9d29822935ec2dfa1
f2fs: add new ioctl F2FS_IOC_GARBAGE_COLLECT

When background gc is off, the only way to trigger gc is executing
a force gc in some operations who wants to grab space in disk.

The executing condition is limited: to execute force gc, we should
wait for the time when there is almost no more free section for LFS
allocation. This seems not reasonable for our user who wants to
control triggering gc by himself.

This patch introduces F2FS_IOC_GARBAGE_COLLECT interface for
triggering garbage collection by using ioctl. It provides our users
one more option to trigger gc.

Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h
fs/f2fs/file.c
fs/f2fs/gc.h