Commit e1e44602 authored by Jeff Layton's avatar Jeff Layton Committed by Ilya Dryomov

ceph: allow copy_file_range when src and dst inode are same

There is no reason to prevent this. The OSD should be able to handle
this as long as the objects are different, and the existing code falls
back when the offset into the object is different.
Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
Acked-by: default avatarLuis Henriques <lhenriques@suse.com>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent 75067034
...@@ -1913,8 +1913,6 @@ static ssize_t __ceph_copy_file_range(struct file *src_file, loff_t src_off, ...@@ -1913,8 +1913,6 @@ static ssize_t __ceph_copy_file_range(struct file *src_file, loff_t src_off,
int src_got = 0, dst_got = 0, err, dirty; int src_got = 0, dst_got = 0, err, dirty;
bool do_final_copy = false; bool do_final_copy = false;
if (src_inode == dst_inode)
return -EINVAL;
if (src_inode->i_sb != dst_inode->i_sb) if (src_inode->i_sb != dst_inode->i_sb)
return -EXDEV; return -EXDEV;
if (ceph_snap(dst_inode) != CEPH_NOSNAP) if (ceph_snap(dst_inode) != CEPH_NOSNAP)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment