Re: [dm-devel] [PATCH v11 2/9] block: Add copy offload support infrastructure

2023-05-30 Thread Maurizio Lombardi
po 22. 5. 2023 v 13:17 odesílatel Nitesh Shetty napsal: > > +static int __blkdev_copy_offload(struct block_device *bdev_in, loff_t pos_in, > + struct block_device *bdev_out, loff_t pos_out, size_t len, > + cio_iodone_t endio, void *private, gfp_t gfp_mask) > +{ > +

Re: [dm-devel] [PATCH v11 2/9] block: Add copy offload support infrastructure

2023-05-30 Thread Nitesh Shetty
On 23/05/29 06:55PM, Matthew Wilcox wrote: On Mon, May 22, 2023 at 04:11:33PM +0530, Nitesh Shetty wrote: + token = alloc_page(gfp_mask); Why is PAGE_SIZE the right size for 'token'? That seems quite unlikely. I could understand it being SECTOR_SIZE or something that's dependent

Re: [dm-devel] [PATCH v11 2/9] block: Add copy offload support infrastructure

2023-05-30 Thread Nitesh Shetty
> > +/* > > + * @bdev_in: source block device > > + * @pos_in: source offset > > + * @bdev_out:destination block device > > + * @pos_out: destination offset > > + * @len: length in bytes to be copied > > + * @endio: endio function to be called on completion of copy operation, > > + *

Re: [dm-devel] [PATCH v11 2/9] block: Add copy offload support infrastructure

2023-05-30 Thread Nitesh Shetty
On 23/05/30 01:29PM, Maurizio Lombardi wrote: po 22. 5. 2023 v 13:17 odesílatel Nitesh Shetty napsal: +static int __blkdev_copy_offload(struct block_device *bdev_in, loff_t pos_in, + struct block_device *bdev_out, loff_t pos_out, size_t len, + cio_iodone_t endio, vo

Re: [dm-devel] [PATCH v11 2/9] block: Add copy offload support infrastructure

2023-05-29 Thread Matthew Wilcox
On Mon, May 22, 2023 at 04:11:33PM +0530, Nitesh Shetty wrote: > + token = alloc_page(gfp_mask); Why is PAGE_SIZE the right size for 'token'? That seems quite unlikely. I could understand it being SECTOR_SIZE or something that's dependent on the device, but I cannot fathom it being de

Re: [dm-devel] [PATCH v11 2/9] block: Add copy offload support infrastructure

2023-05-24 Thread Darrick J. Wong
On Mon, May 22, 2023 at 04:11:33PM +0530, Nitesh Shetty wrote: > Introduce blkdev_issue_copy which takes similar arguments as > copy_file_range and performs copy offload between two bdevs. > Introduce REQ_COPY copy offload operation flag. Create a read-write > bio pair with a token as payload and s