Re: [dm-devel] [PATCH v13 3/9] block: add emulation for copy

2023-08-01 Thread Kent Overstreet
On Tue, Aug 01, 2023 at 06:37:02PM +0530, Nitesh Shetty wrote: > On 23/07/20 09:50AM, Christoph Hellwig wrote: > > > +static void *blkdev_copy_alloc_buf(sector_t req_size, sector_t > > > *alloc_size, > > > + gfp_t gfp_mask) > > > +{ > > > + int min_size = PAGE_SIZE; > > > + void *buf; > >

Re: [dm-devel] [PATCH v13 3/9] block: add emulation for copy

2023-08-01 Thread Nitesh Shetty
On 23/07/20 09:50AM, Christoph Hellwig wrote: +static void *blkdev_copy_alloc_buf(sector_t req_size, sector_t *alloc_size, + gfp_t gfp_mask) +{ + int min_size = PAGE_SIZE; + void *buf; + + while (req_size >= min_size) { + buf = kvmalloc(req_size, gfp_

Re: [dm-devel] [PATCH v13 3/9] block: add emulation for copy

2023-07-20 Thread Christoph Hellwig
> +static void *blkdev_copy_alloc_buf(sector_t req_size, sector_t *alloc_size, > + gfp_t gfp_mask) > +{ > + int min_size = PAGE_SIZE; > + void *buf; > + > + while (req_size >= min_size) { > + buf = kvmalloc(req_size, gfp_mask); > + if (buf) { > +

Re: [dm-devel] [PATCH v13 3/9] block: add emulation for copy

2023-07-09 Thread Damien Le Moal
On 6/28/23 03:36, Nitesh Shetty wrote: > For the devices which does not support copy, copy emulation is added. > It is required for in-kernel users like fabrics, where file descriptor is > not available and hence they can't use copy_file_range. > Copy-emulation is implemented by reading from source

Re: [dm-devel] [PATCH v13 3/9] block: add emulation for copy

2023-06-30 Thread Nitesh Shetty
On 23/06/29 04:33PM, Ming Lei wrote: Hi Nitesh, On Wed, Jun 28, 2023 at 12:06:17AM +0530, Nitesh Shetty wrote: For the devices which does not support copy, copy emulation is added. It is required for in-kernel users like fabrics, where file descriptor is I can understand copy command does hel

Re: [dm-devel] [PATCH v13 3/9] block: add emulation for copy

2023-06-29 Thread Ming Lei
Hi Nitesh, On Wed, Jun 28, 2023 at 12:06:17AM +0530, Nitesh Shetty wrote: > For the devices which does not support copy, copy emulation is added. > It is required for in-kernel users like fabrics, where file descriptor is I can understand copy command does help for FS GC and fabrics storages, but

Re: [dm-devel] [PATCH v13 3/9] block: add emulation for copy

2023-06-29 Thread Nitesh Shetty
On 23/06/28 03:50PM, Damien Le Moal wrote: On 6/28/23 03:36, Nitesh Shetty wrote: For the devices which does not support copy, copy emulation is added. It is required for in-kernel users like fabrics, where file descriptor is not available and hence they can't use copy_file_range. Copy-emulation