Re: [PATCH for-next v10 4/7] nvme: refactor nvme_alloc_request

Anuj Gupta
2022-09-29T11:50:10Z

[-- Attachment #1: Type: text/plain, Size: 791 bytes --]

On Wed, Sep 28, 2022 at 07:19:32PM +0200, Christoph Hellwig wrote:
> > + if (!vec)
> > + ret = blk_rq_map_user(q, req, NULL, ubuffer, bufflen,
> > + GFP_KERNEL);
> > + else {
> > + struct iovec fast_iov[UIO_FASTIOV];
> > + struct iovec *iov = fast_iov;
> > + struct iov_iter iter;
> > +
> > + ret = import_iovec(rq_data_dir(req), ubuffer, bufflen,
> > + UIO_FASTIOV, &iov, &iter);
> > + if (ret < 0)
> > goto out;
> > +
> > + ret = blk_rq_map_user_iov(q, req, NULL, &iter, GFP_KERNEL);
> > + kfree(iov);
> > + }
>
> As mentioned before this is something that should got into blk-map.c
> as a separate helper, and scsi_ioctl.c and sg.c should be switched to
> use it as well.
>

sure, this will be done in the next iteration
> Otherwise this looks good.

--
Anuj Gupta

>

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]