diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-07-09 00:16:47 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-07-20 23:53:20 +0200 |
commit | 4dd6f977fc778e5a0da604e5f8cb2f36d163d27b (patch) | |
tree | 5bb72dd9426c0f1d685fa6dc0863e808bb8f8334 /fs/f2fs/f2fs.h | |
parent | f2fs: fix to report error number of f2fs_find_entry (diff) | |
download | linux-4dd6f977fc778e5a0da604e5f8cb2f36d163d27b.tar.xz linux-4dd6f977fc778e5a0da604e5f8cb2f36d163d27b.zip |
f2fs: support an ioctl to move a range of data blocks
This patch implements moving a range of data blocks from source file to
destination file.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r-- | fs/f2fs/f2fs.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index c7378540ba37..7a57279b2c54 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -268,6 +268,8 @@ static inline bool __has_cursum_space(struct f2fs_journal *journal, #define F2FS_IOC_GARBAGE_COLLECT _IO(F2FS_IOCTL_MAGIC, 6) #define F2FS_IOC_WRITE_CHECKPOINT _IO(F2FS_IOCTL_MAGIC, 7) #define F2FS_IOC_DEFRAGMENT _IO(F2FS_IOCTL_MAGIC, 8) +#define F2FS_IOC_MOVE_RANGE _IOWR(F2FS_IOCTL_MAGIC, 9, \ + struct f2fs_move_range) #define F2FS_IOC_SET_ENCRYPTION_POLICY FS_IOC_SET_ENCRYPTION_POLICY #define F2FS_IOC_GET_ENCRYPTION_POLICY FS_IOC_GET_ENCRYPTION_POLICY @@ -297,6 +299,13 @@ struct f2fs_defragment { u64 len; }; +struct f2fs_move_range { + u32 dst_fd; /* destination fd */ + u64 pos_in; /* start position in src_fd */ + u64 pos_out; /* start position in dst_fd */ + u64 len; /* size to move */ +}; + /* * For INODE and NODE manager */ |