Re: [PATCH 1/2] dma-buf: heaps: DMA_HEAP_IOCTL_ALLOC_READ_FILE framework

From: Christoph Hellwig
Date: Wed Jul 17 2024 - 23:08:41 EST


On Thu, Jul 18, 2024 at 09:51:39AM +0800, Huan Yang wrote:
> Yes, actually, if dma-buf want's to copy_file_range from a file, it need
> change something in vfs_copy_file_range:

No, it doesn't. copy_file_range is specifically designed to copy inside
a single file system as already mentioned. The generic offload for
copying between arbitrary FDs is splice and the sendfile convenience
wrapper around it