Message ID | e2939a17b63f9347ba3c1c193c4a9306c3ba0845.1710720150.git.asml.silence@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | remove aux CQE caches | expand |
On 3/18/2024 6:11 AM, Pavel Begunkov wrote: > uring_cmd implementations should not try to guess issue_flags, use a > freshly added helper io_uring_cmd_complete() instead. NVMe interactions look/work fine. Reviewed-by: Kanchan Joshi <joshi.k@samsung.com>
On 3/18/24 13:26, Kanchan Joshi wrote: > On 3/18/2024 6:11 AM, Pavel Begunkov wrote: >> uring_cmd implementations should not try to guess issue_flags, use a >> freshly added helper io_uring_cmd_complete() instead. > > NVMe interactions look/work fine. > > Reviewed-by: Kanchan Joshi <joshi.k@samsung.com> Thanks, I'll add it
diff --git a/drivers/nvme/host/ioctl.c b/drivers/nvme/host/ioctl.c index 3dfd5ae99ae0..1a7b5af42dbc 100644 --- a/drivers/nvme/host/ioctl.c +++ b/drivers/nvme/host/ioctl.c @@ -426,10 +426,13 @@ static enum rq_end_io_ret nvme_uring_cmd_end_io(struct request *req, * For iopoll, complete it directly. * Otherwise, move the completion to task work. */ - if (blk_rq_is_poll(req)) - nvme_uring_task_cb(ioucmd, IO_URING_F_UNLOCKED); - else + if (blk_rq_is_poll(req)) { + if (pdu->bio) + blk_rq_unmap_user(pdu->bio); + io_uring_cmd_complete(ioucmd, pdu->status, pdu->result); + } else { io_uring_cmd_do_in_task_lazy(ioucmd, nvme_uring_task_cb); + } return RQ_END_IO_FREE; }