Re: [RFC PATCH v5 2/4] block: add simple copy support

2021-04-14 Thread Selva Jove
I agree with you. Will remove BLKDEV_COPY_NOEMULATION. On Tue, Apr 13, 2021 at 6:03 AM Damien Le Moal wrote: > > On 2021/04/12 23:35, Selva Jove wrote: > > On Mon, Apr 12, 2021 at 5:55 AM Damien Le Moal > > wrote: > >> > >> On 2021/04/07 20:33, Selva J

Re: [RFC PATCH v5 2/4] block: add simple copy support

2021-04-12 Thread Selva Jove
On Mon, Apr 12, 2021 at 5:55 AM Damien Le Moal wrote: > > On 2021/04/07 20:33, Selva Jove wrote: > > Initially I started moving the dm-kcopyd interface to the block layer > > as a generic interface. > > Once I dig deeper in dm-kcopyd code, I figured that dm-kcopy

Re: [RFC PATCH v5 2/4] block: add simple copy support

2021-04-07 Thread Selva Jove
Initially I started moving the dm-kcopyd interface to the block layer as a generic interface. Once I dig deeper in dm-kcopyd code, I figured that dm-kcopyd is tightly coupled with dm_io() To move dm-kcopyd to block layer, it would also require dm_io code to be moved to block layer. It would cause

Re: [RFC PATCH v5 0/4] add simple copy support

2021-02-23 Thread Selva Jove
Dave, copy_file_range() is work under progress. FALLOC_FL_UNSHARE of fallocate() use case sounds interesting. I will try to address both of them in the next series. Adding SCSI_XCOPY() support is not in the scope of this patchset. However blkdev_issue_copy() interface is made generic so that it

Re: [RFC PATCH v5 0/4] add simple copy support

2021-02-23 Thread Selva Jove
Thanks Su Yue. I'll update the link in the next series. On Mon, Feb 22, 2021 at 12:23 PM Su Yue wrote: > > > On Fri 19 Feb 2021 at 20:45, SelvaKumar S > wrote: > > > This patchset tries to add support for TP4065a ("Simple Copy > > Command"), > > v2020.05.04 ("Ratified") > > > > The

Re: [RFC PATCH v5 3/4] nvme: add simple copy support

2021-02-22 Thread Selva Jove
Matthew, Maximum Source Range Count (MSRC) is limited by u8. So the maximum number of source ranges is 256 (0 base value). The number of pages required to be sent to the device is at most 2. Since we are allocating the memory using kmalloc_array(), we would get a continuous physical segment.

Re: [dm-devel] [RFC PATCH v4 2/3] block: add simple copy support

2021-01-05 Thread Selva Jove
Hi Darrick, On Tue, Jan 5, 2021 at 12:33 AM Darrick J. Wong wrote: > > SelvaKumar S: This didn't show up on dm-devel, sorry for the OT reply... > > On Mon, Jan 04, 2021 at 12:47:11PM +, Damien Le Moal wrote: > > On 2021/01/04 19:48, SelvaKumar S wrote: > > > Add new BLKCOPY ioctl that

Re: [RFC PATCH v4 2/3] block: add simple copy support

2021-01-05 Thread Selva Jove
Thanks for the review, Damien. On Mon, Jan 4, 2021 at 6:17 PM Damien Le Moal wrote: > > On 2021/01/04 19:48, SelvaKumar S wrote: > > Add new BLKCOPY ioctl that offloads copying of one or more sources > > ranges to a destination in the device. Accepts copy_ranges that contains > > destination, no

Re: [RFC PATCH v4 1/3] block: export bio_map_kern()

2021-01-04 Thread Selva Jove
Thanks Damien, Will update that. On Mon, Jan 4, 2021 at 5:45 PM Damien Le Moal wrote: > > On 2021/01/04 19:48, SelvaKumar S wrote: > > Export bio_map_kern() so that copy offload emulation can use > > it to add vmalloced memory to bio. > > > > Signed-off-by: SelvaKumar S > > --- > >

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 2/2] nvme: add simple copy support

2020-12-02 Thread Selva Jove
On Tue, Dec 1, 2020 at 8:46 PM Keith Busch wrote: > > On Tue, Dec 01, 2020 at 11:09:49AM +0530, SelvaKumar S wrote: > > +static void nvme_config_copy(struct gendisk *disk, struct nvme_ns *ns, > > +struct nvme_id_ns *id) > > +{ > > + struct nvme_ctrl *ctrl =

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

2020-12-01 Thread Selva Jove
Thanks for reporting the memory leak. Will add a fix. On Tue, Dec 1, 2020 at 3:58 PM Aleksei Marov wrote: > > On Tue, 2020-12-01 at 11:09 +0530, SelvaKumar S wrote: > > + ret = __blkdev_issue_copy(bdev, dest, nr_srcs, rlist, gfp_mask, flags, > > + ); > > + if (!ret &&