From: Kanchan Joshi <joshi.k@samsung.com>
To: Christoph Hellwig <hch@lst.de>
Cc: axboe@kernel.dk, kbusch@kernel.org, io-uring@vger.kernel.org,
linux-nvme@lists.infradead.org, linux-block@vger.kernel.org,
gost.dev@samsung.com
Subject: Re: [PATCH for-next v8 3/5] nvme: refactor nvme_alloc_user_request
Date: Sun, 25 Sep 2022 23:09:47 +0530 [thread overview]
Message-ID: <20220925173947.GA6320@test-zns> (raw)
In-Reply-To: <20220923153819.GC21275@lst.de>
[-- Attachment #1: Type: text/plain, Size: 1324 bytes --]
On Fri, Sep 23, 2022 at 05:38:19PM +0200, Christoph Hellwig wrote:
>
>> + 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);
>> + }
>
>While you touch this: I think thi block of code would also be a good
>separate helper. Maybe even in the block layer given the the scsi
>ioctl code and sg duplicate it, and already missed the fast_iov
>treatment due to the duplication. Having this in a separate function
>is also nice to keep the fast_iov stack footprint isolated.
Totally agree on goodness.
I think instead of new helper this seems suited to go inside
blk_rq_map_user_iov itself. That will make it symmetric to
blk_rq_map_user which also combines import + mapping.
But if I go that route now, I will have to alter parameters of
blk_rq_map_user_iov, and that will make it mandatory to change the
callers (scsi-ioctl, sg) too. Nothing hairy, but that means further
growth of unrelated elements in this series. Hope you agree that
separate series is much better, which I will post after this.
Will fold all other changes you pointed.
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2022-09-25 17:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20220923093906epcas5p1308a262f3de722a923339c2e804fc5ee@epcas5p1.samsung.com>
2022-09-23 9:28 ` [PATCH for-next v8 0/5] fixed-buffer for uring-cmd/passthru Kanchan Joshi
2022-09-23 9:28 ` [PATCH for-next v8 1/5] io_uring: add io_uring_cmd_import_fixed Kanchan Joshi
2022-09-23 9:28 ` [PATCH for-next v8 2/5] io_uring: introduce fixed buffer support for io_uring_cmd Kanchan Joshi
2022-09-23 9:28 ` [PATCH for-next v8 3/5] nvme: refactor nvme_alloc_user_request Kanchan Joshi
2022-09-23 15:38 ` Christoph Hellwig
2022-09-25 17:39 ` Kanchan Joshi [this message]
2022-09-25 19:43 ` Kanchan Joshi
2022-09-26 14:51 ` Christoph Hellwig
2022-09-27 16:57 ` Kanchan Joshi
2022-09-23 9:28 ` [PATCH for-next v8 4/5] block: add helper to map bvec iterator for passthrough Kanchan Joshi
2022-09-23 15:30 ` Christoph Hellwig
2022-09-23 9:28 ` [PATCH for-next v8 5/5] nvme: wire up fixed buffer support for nvme passthrough Kanchan Joshi
2022-09-23 15:40 ` Christoph Hellwig
2022-09-23 14:15 ` [PATCH for-next v8 0/5] fixed-buffer for uring-cmd/passthru Jens Axboe
2022-09-25 17:56 ` Kanchan Joshi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220925173947.GA6320@test-zns \
--to=joshi.k@samsung.com \
--cc=axboe@kernel.dk \
--cc=gost.dev@samsung.com \
--cc=hch@lst.de \
--cc=io-uring@vger.kernel.org \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.