ceph: use copy-from2 op in copy_file_range
authorLuis Henriques <lhenriques@suse.com>
Wed, 8 Jan 2020 10:03:53 +0000 (10:03 +0000)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 27 Jan 2020 15:53:40 +0000 (16:53 +0100)
commit78beb0ff2feceb1d7568333f93195e1a4d95a49a
tree95c0d293b1403ac31c1adf75d95a8ea02fb985d1
parent045100cd79f503487b95a1d11e96b221fe50693c
ceph: use copy-from2 op in copy_file_range

Instead of using the copy-from operation, switch copy_file_range to the
new copy-from2 operation, which allows to send the truncate_seq and
truncate_size parameters.

If an OSD does not support the copy-from2 operation it will return
-EOPNOTSUPP.  In that case, the kernel client will stop trying to do
remote object copies for this fs client and will always use the generic
VFS copy_file_range.

Signed-off-by: Luis Henriques <lhenriques@suse.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/file.c
fs/ceph/super.c
fs/ceph/super.h
include/linux/ceph/osd_client.h
include/linux/ceph/rados.h
net/ceph/osd_client.c