[PATCH 2/5] block: add support for copy offload

Christoph Hellwig hch at infradead.org
Sun May 25 22:22:41 PDT 2025


On Fri, May 23, 2025 at 07:48:54AM -0600, Keith Busch wrote:
> I like that idea.
>  
> >  - bio_add_copy_src not updating bi_size is unexpected and annoying :)
> 
> Ha, I currently have the submitter responsible for bi_size. Your
> suggestion will make this easier to use.

Another thing about bio_add_copy_src:  currently it gets passes a
bio_vec, which doesn't really help it's own implementation much, and
actually makes the callers more cumbersome.  I'd pass the sector and
number of sectors (or maybe byte length to be closer to the other block
x`interfaces?) as separate scalar arguments instead.  For both current
callers of blkdev_copy_range and iterative interface where they build
up the range without having to allocate the bvec array would simply
the code.




More information about the Linux-nvme mailing list