From: Jens Axboe <axboe@kernel.dk>
To: Kanchan Joshi <joshi.k@samsung.com>, hch@lst.de
Cc: io-uring@vger.kernel.org, linux-nvme@lists.infradead.org,
linux-block@vger.kernel.org, ming.lei@redhat.com,
joshiiitr@gmail.com, gost.dev@samsung.com,
Anuj Gupta <anuj20.g@samsung.com>
Subject: Re: [PATCH 4/4] nvme: wire up async polling for io passthrough commands
Date: Fri, 5 Aug 2022 11:03:55 -0600 [thread overview]
Message-ID: <769524f5-c725-85f7-e7ac-ca3b2b2d884e@kernel.dk> (raw)
In-Reply-To: <20220805154226.155008-5-joshi.k@samsung.com>
On 8/5/22 9:42 AM, Kanchan Joshi wrote:
> @@ -685,6 +721,29 @@ int nvme_ns_head_chr_uring_cmd(struct io_uring_cmd *ioucmd,
> srcu_read_unlock(&head->srcu, srcu_idx);
> return ret;
> }
> +
> +int nvme_ns_head_chr_uring_cmd_iopoll(struct io_uring_cmd *ioucmd)
> +{
> + struct cdev *cdev = file_inode(ioucmd->file)->i_cdev;
> + struct nvme_ns_head *head = container_of(cdev, struct nvme_ns_head, cdev);
> + int srcu_idx = srcu_read_lock(&head->srcu);
> + struct nvme_ns *ns = nvme_find_path(head);
> + struct bio *bio;
> + int ret = 0;
> + struct request_queue *q;
> +
> + if (ns) {
> + rcu_read_lock();
> + bio = READ_ONCE(ioucmd->private);
> + q = ns->queue;
> + if (test_bit(QUEUE_FLAG_POLL, &q->queue_flags) && bio
> + && bio->bi_bdev)
> + ret = bio_poll(bio, 0, 0);
> + rcu_read_unlock();
> + }
> + srcu_read_unlock(&head->srcu, srcu_idx);
> + return ret;
> +}
> #endif /* CONFIG_NVME_MULTIPATH */
Looks like that READ_ONCE() should be:
bio = READ_ONCE(ioucmd->cookie);
?
--
Jens Axboe
next prev parent reply other threads:[~2022-08-05 17:04 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20220805155300epcas5p1b98722e20990d0095238964e2be9db34@epcas5p1.samsung.com>
2022-08-05 15:42 ` [PATCH 0/4] iopoll support for io_uring/nvme passthrough Kanchan Joshi
2022-08-05 15:42 ` [PATCH 1/4] fs: add file_operations->uring_cmd_iopoll Kanchan Joshi
2022-08-05 15:42 ` [PATCH 2/4] io_uring: add iopoll infrastructure for io_uring_cmd Kanchan Joshi
2022-08-05 15:42 ` [PATCH 3/4] block: export blk_rq_is_poll Kanchan Joshi
2022-08-05 15:42 ` [PATCH 4/4] nvme: wire up async polling for io passthrough commands Kanchan Joshi
2022-08-05 17:03 ` Jens Axboe [this message]
2022-08-05 17:07 ` Kanchan Joshi
2022-08-05 21:22 ` kernel test robot
2022-08-06 0:06 ` kernel test robot
2022-08-06 1:38 ` kernel test robot
2022-08-07 12:25 ` kernel test robot
2022-08-05 17:04 ` [PATCH 0/4] iopoll support for io_uring/nvme passthrough Jens Axboe
2022-08-05 17:13 ` Kanchan Joshi
2022-08-05 17:27 ` Jens Axboe
2022-08-05 17:18 ` Jens Axboe
2022-08-05 18:11 ` Keith Busch
2022-08-05 18:15 ` Jens Axboe
2022-08-07 17:58 ` Kanchan Joshi
2022-08-07 18:46 ` Jens Axboe
2022-08-05 18:21 ` Jens Axboe
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=769524f5-c725-85f7-e7ac-ca3b2b2d884e@kernel.dk \
--to=axboe@kernel.dk \
--cc=anuj20.g@samsung.com \
--cc=gost.dev@samsung.com \
--cc=hch@lst.de \
--cc=io-uring@vger.kernel.org \
--cc=joshi.k@samsung.com \
--cc=joshiiitr@gmail.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=ming.lei@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox