From: Keith Busch <kbusch@kernel.org>
To: Kanchan Joshi <joshi.k@samsung.com>
Cc: Keith Busch <kbusch@meta.com>,
linux-nvme@lists.infradead.org, linux-block@vger.kernel.org,
io-uring@vger.kernel.org, axboe@kernel.dk, hch@lst.de,
sagi@grimberg.me
Subject: Re: [PATCHv2 2/5] nvme: simplify passthrough bio cleanup
Date: Tue, 11 Apr 2023 10:46:14 -0700 [thread overview]
Message-ID: <ZDWc5iavegZADUyY@kbusch-mbp> (raw)
In-Reply-To: <20230410112503.GA16047@green5>
On Mon, Apr 10, 2023 at 04:55:03PM +0530, Kanchan Joshi wrote:
> On Fri, Apr 07, 2023 at 12:16:33PM -0700, Keith Busch wrote:
> > +static void nvme_uring_bio_end_io(struct bio *bio)
> > +{
> > + blk_rq_unmap_user(bio);
> > +}
> > +
> > static int nvme_map_user_request(struct request *req, u64 ubuffer,
> > unsigned bufflen, void __user *meta_buffer, unsigned meta_len,
> > u32 meta_seed, void **metap, struct io_uring_cmd *ioucmd,
> > @@ -204,6 +209,7 @@ static int nvme_map_user_request(struct request *req, u64 ubuffer,
> > *metap = meta;
> > }
> >
> > + bio->bi_end_io = nvme_uring_bio_end_io;
> > return ret;
> >
> > out_unmap:
> > @@ -249,8 +255,6 @@ static int nvme_submit_user_cmd(struct request_queue *q,
> > if (meta)
> > ret = nvme_finish_user_metadata(req, meta_buffer, meta,
> > meta_len, ret);
> > - if (bio)
> > - blk_rq_unmap_user(bio);
>
> Is it safe to call blk_rq_unamp_user in irq context?
Doh! I boxed my thinking into the polling mode that completely neglected the
more common use case. Thanks, now back to the drawing board for me...
next prev parent reply other threads:[~2023-04-11 17:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-07 19:16 [PATCHv2 0/5] nvme io_uring_cmd polling enhancements Keith Busch
2023-04-07 19:16 ` [PATCHv2 1/5] block: add request polling helper Keith Busch
2023-04-07 19:16 ` [PATCHv2 2/5] nvme: simplify passthrough bio cleanup Keith Busch
2023-04-08 0:22 ` kernel test robot
2023-04-10 11:25 ` Kanchan Joshi
2023-04-11 17:46 ` Keith Busch [this message]
2023-04-10 21:02 ` kernel test robot
2023-04-11 0:59 ` kernel test robot
2023-04-07 19:16 ` [PATCHv2 3/5] nvme: unify nvme request end_io Keith Busch
2023-04-10 11:34 ` Kanchan Joshi
2023-04-07 19:16 ` [PATCHv2 4/5] nvme: use blk-mq polling for uring commands Keith Busch
2023-04-07 19:16 ` [PATCHv2 5/5] io_uring: remove uring_cmd cookie Keith Busch
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=ZDWc5iavegZADUyY@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=io-uring@vger.kernel.org \
--cc=joshi.k@samsung.com \
--cc=kbusch@meta.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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.