f2fs: add ioctl to do gc with target block address
Subsystems (2)
Jaegeuk Kim
maintainerPATCH 1/1 f2fs: add ioctl to do gc with target block address
This patch adds f2fs_ioc_gc_range() to move blocks located in the given range.
Signed-off-by Jaegeuk Kim <[email protected]>
--- fs/f2fs/f2fs.h | 8 ++++++++ fs/f2fs/file.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+)
fs/f2fs/f2fs.h +8 -0
@@ -303,6 +303,8 @@ static inline bool __has_cursum_space(struct f2fs_journal *journal, struct f2fs_move_range)#define F2FS_IOC_FLUSH_DEVICE _IOW(F2FS_IOCTL_MAGIC, 10, \ struct f2fs_flush_device) +#define F2FS_IOC_GARBAGE_COLLECT_RANGE _IOW(F2FS_IOCTL_MAGIC, 11, \ + struct f2fs_gc_range)#define F2FS_IOC_SET_ENCRYPTION_POLICY FS_IOC_SET_ENCRYPTION_POLICY#define F2FS_IOC_GET_ENCRYPTION_POLICY FS_IOC_GET_ENCRYPTION_POLICY
@@ -327,6 +329,12 @@ static inline bool __has_cursum_space(struct f2fs_journal *journal,#define F2FS_IOC32_GETVERSION FS_IOC32_GETVERSION#endif +struct f2fs_gc_range { +u32 sync; +u64 start; +u64 len; +}; +struct f2fs_defragment {u64 start;u64 len;
fs/f2fs/file.c +47 -0
65 lines not on this page · raw message
Signature · 1 line
2.13.0.rc1.294.g07d810a77f-goog