ceph: support copy_file_range file operation
authorLuis Henriques <lhenriques@suse.com>
Mon, 15 Oct 2018 15:45:59 +0000 (16:45 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 22 Oct 2018 08:28:24 +0000 (10:28 +0200)
commit503f82a9932d311c12430779627f7a130bbe462a
treec8040ee6fa052eeec74ca8a95f4c357b43584be8
parent23ddf9bea900b4ce39e5707e1ddf66062cfe6d91
ceph: support copy_file_range file operation

This commit implements support for the copy_file_range syscall in cephfs.
It is implemented using the RADOS 'copy-from' operation, which allows to
do a remote object copy, without the need to download/upload data from/to
the OSDs.

Some manual copy may however be required if the source/destination file
offsets aren't object aligned or if the copy length is smaller than the
object size.

Signed-off-by: Luis Henriques <lhenriques@suse.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/file.c