On Mon, Dec 04, 2023 at 09:37:33AM +0100, Christoph Hellwig wrote: > > put_rd_wr_caps(src_ci, src_got, dst_ci, dst_got); > > - ret = do_splice_direct(src_file, &src_off, dst_file, > > - &dst_off, src_objlen, flags); > > + ret = splice_file_range(src_file, &src_off, dst_file, &dst_off, > > + src_objlen); > > Shouldb't ceph be switched to use generic_copy_file_range? > That does the capping of the size which we want, and doesn't update > the file offsets, which would require recalculation in the ceph code. > > But this could avoid another exported API as splice_file_range could > simply be folded into generic_copy_file_range which should reduce > confusion. And splice really is a mess for so many different layers > of the onion being exposed. I've been wanting to reduce some of that > for a while but haven't found a really nice way yet. (and generic_copy_file_range really should be renamed to splice_copy_file_range and moved to splice.c)