aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2019-07-24 07:59:51 -0400
committerIlya Dryomov <idryomov@gmail.com>2019-09-16 06:06:23 -0400
commite1e44602021358336fb524affe53ce3c09b34beb (patch)
tree44893957884d6e7b30d364c1cb28c4c06eabde1f /fs/ceph
parent750670341a24cb714e624e0fd7da30900ad93752 (diff)
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: Jeff Layton <jlayton@kernel.org> Acked-by: Luis Henriques <lhenriques@suse.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/file.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 685a03cc4b77..f657fabcb3ee 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -1913,8 +1913,6 @@ static ssize_t __ceph_copy_file_range(struct file *src_file, loff_t src_off,
1913 int src_got = 0, dst_got = 0, err, dirty; 1913 int src_got = 0, dst_got = 0, err, dirty;
1914 bool do_final_copy = false; 1914 bool do_final_copy = false;
1915 1915
1916 if (src_inode == dst_inode)
1917 return -EINVAL;
1918 if (src_inode->i_sb != dst_inode->i_sb) 1916 if (src_inode->i_sb != dst_inode->i_sb)
1919 return -EXDEV; 1917 return -EXDEV;
1920 if (ceph_snap(dst_inode) != CEPH_NOSNAP) 1918 if (ceph_snap(dst_inode) != CEPH_NOSNAP)