Re: [RFC PATCH v3 1/2] block: add simple copy support

2020-12-13 Thread Selva Jove
On Fri, Dec 11, 2020 at 9:56 PM Johannes Thumshirn wrote: > > On 11/12/2020 15:57, SelvaKumar S wrote: > [...] > > +int blk_copy_emulate(struct block_device *bdev, struct blk_copy_payload > > *payload, > > + gfp_t gfp_mask) > > +{ > > + struct request_queue *q =

Re: [RFC PATCH v3 1/2] block: add simple copy support

2020-12-13 Thread Selva Jove
On Fri, Dec 11, 2020 at 11:35 PM Keith Busch wrote: > > On Fri, Dec 11, 2020 at 07:21:38PM +0530, SelvaKumar S wrote: > > +int blk_copy_emulate(struct block_device *bdev, struct blk_copy_payload > > *payload, > > + gfp_t gfp_mask) > > +{ > > + struct request_queue *q =

Re: [RFC PATCH v3 1/2] block: add simple copy support

2020-12-11 Thread Keith Busch
On Fri, Dec 11, 2020 at 07:21:38PM +0530, SelvaKumar S wrote: > +int blk_copy_emulate(struct block_device *bdev, struct blk_copy_payload > *payload, > + gfp_t gfp_mask) > +{ > + struct request_queue *q = bdev_get_queue(bdev); > + struct bio *bio; > + void *buf = NULL; > +

Re: [RFC PATCH v3 1/2] block: add simple copy support

2020-12-11 Thread Mikulas Patocka
On Fri, 11 Dec 2020, Johannes Thumshirn wrote: > On 11/12/2020 15:57, SelvaKumar S wrote: > [...] > > +int blk_copy_emulate(struct block_device *bdev, struct blk_copy_payload > > *payload, > > + gfp_t gfp_mask) > > +{ > > + struct request_queue *q = bdev_get_queue(bdev); > > +

Re: [RFC PATCH v3 1/2] block: add simple copy support

2020-12-11 Thread Johannes Thumshirn
On 11/12/2020 15:57, SelvaKumar S wrote: [...] > +int blk_copy_emulate(struct block_device *bdev, struct blk_copy_payload > *payload, > + gfp_t gfp_mask) > +{ > + struct request_queue *q = bdev_get_queue(bdev); > + struct bio *bio; > + void *buf = NULL; > + int i,

[RFC PATCH v3 1/2] block: add simple copy support

2020-12-11 Thread SelvaKumar S
Add new BLKCOPY ioctl that offloads copying of multiple sources to a destination to the device. Accept copy_ranges that contains destination, no of sources and pointer to the array of source ranges. Each range_entry contains start and length of source ranges (in bytes). Introduce REQ_OP_COPY, a