diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2018-07-06 23:57:03 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2018-07-06 23:57:03 +0200 |
commit | 87eb5eb2423213ac0e7315ce5d275f1ff80e0263 (patch) | |
tree | cc3989b81d60721f1e22da3181444800f8828d03 /fs/btrfs | |
parent | 5740c99e9d30b81fcc478797e7215c61e241f44e (diff) | |
download | linux-87eb5eb2423213ac0e7315ce5d275f1ff80e0263.tar.gz |
vfs: dedupe: rationalize args
Clean up f_op->dedupe_file_range() interface.
1) Use loff_t for offsets and length instead of u64
2) Order the arguments the same way as {copy|clone}_file_range().
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/ctree.h | 5 | ||||
-rw-r--r-- | fs/btrfs/ioctl.c | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 1c7c13334423..d9d924017dfb 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -3247,8 +3247,9 @@ void btrfs_get_block_group_info(struct list_head *groups_list, struct btrfs_ioctl_space_info *space); void btrfs_update_ioctl_balance_args(struct btrfs_fs_info *fs_info, struct btrfs_ioctl_balance_args *bargs); -int btrfs_dedupe_file_range(struct file *src_file, u64 loff, u64 olen, - struct file *dst_file, u64 dst_loff); +int btrfs_dedupe_file_range(struct file *src_file, loff_t src_loff, + struct file *dst_file, loff_t dst_loff, + u64 olen); /* file.c */ int __init btrfs_auto_defrag_init(void); diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 94dc8e6c44ce..755c9a306321 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -3600,8 +3600,9 @@ out_free: return ret; } -int btrfs_dedupe_file_range(struct file *src_file, u64 loff, u64 olen, - struct file *dst_file, u64 dst_loff) +int btrfs_dedupe_file_range(struct file *src_file, loff_t src_loff, + struct file *dst_file, loff_t dst_loff, + u64 olen) { struct inode *src = file_inode(src_file); struct inode *dst = file_inode(dst_file); @@ -3616,7 +3617,7 @@ int btrfs_dedupe_file_range(struct file *src_file, u64 loff, u64 olen, return -EINVAL; } - return btrfs_extent_same(src, loff, olen, dst, dst_loff); + return btrfs_extent_same(src, src_loff, olen, dst, dst_loff); } static int clone_finish_inode_update(struct btrfs_trans_handle *trans, |