diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-06-03 10:21:43 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-06-03 10:21:43 -0700 |
| commit | 72fbbc3d0e3e3117c29a73d0b4d928dc00ed99ce (patch) | |
| tree | 7b786dde386ed70c3930de6356e6fd406f2db36e /drivers/nvme | |
| parent | 34845d92bca527b5c2cf8b2293b71b9c746c79ca (diff) | |
| parent | e2e530867245d051dc7800b0d07193b3e581f5b9 (diff) | |
| download | cachepc-linux-72fbbc3d0e3e3117c29a73d0b4d928dc00ed99ce.tar.gz cachepc-linux-72fbbc3d0e3e3117c29a73d0b4d928dc00ed99ce.zip | |
Merge tag 'for-5.19/block-exec-2022-06-02' of git://git.kernel.dk/linux-block
Pull block request execute cleanups from Jens Axboe:
"This change was advertised in the initial core block pull request, but
didn't actually make that branch as we deferred it to a post-merge
pull request to avoid a bunch of cross branch issues.
This series cleans up the block execute path quite nicely"
* tag 'for-5.19/block-exec-2022-06-02' of git://git.kernel.dk/linux-block:
blk-mq: remove the done argument to blk_execute_rq_nowait
blk-mq: avoid a mess of casts for blk_end_sync_rq
blk-mq: remove __blk_execute_rq_nowait
Diffstat (limited to 'drivers/nvme')
| -rw-r--r-- | drivers/nvme/host/core.c | 3 | ||||
| -rw-r--r-- | drivers/nvme/host/ioctl.c | 3 | ||||
| -rw-r--r-- | drivers/nvme/host/pci.c | 10 | ||||
| -rw-r--r-- | drivers/nvme/target/passthru.c | 3 |
4 files changed, 13 insertions, 6 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 72f7c955c707..727c12cbe327 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1206,9 +1206,10 @@ static void nvme_keep_alive_work(struct work_struct *work) nvme_init_request(rq, &ctrl->ka_cmd); rq->timeout = ctrl->kato * HZ; + rq->end_io = nvme_keep_alive_end_io; rq->end_io_data = ctrl; rq->rq_flags |= RQF_QUIET; - blk_execute_rq_nowait(rq, false, nvme_keep_alive_end_io); + blk_execute_rq_nowait(rq, false); } static void nvme_start_keep_alive(struct nvme_ctrl *ctrl) diff --git a/drivers/nvme/host/ioctl.c b/drivers/nvme/host/ioctl.c index 096b1b47d750..a2e89db1cd63 100644 --- a/drivers/nvme/host/ioctl.c +++ b/drivers/nvme/host/ioctl.c @@ -453,6 +453,7 @@ static int nvme_uring_cmd_io(struct nvme_ctrl *ctrl, struct nvme_ns *ns, blk_flags); if (IS_ERR(req)) return PTR_ERR(req); + req->end_io = nvme_uring_cmd_end_io; req->end_io_data = ioucmd; /* to free bio on completion, as req->bio will be null at that time */ @@ -461,7 +462,7 @@ static int nvme_uring_cmd_io(struct nvme_ctrl *ctrl, struct nvme_ns *ns, pdu->meta_buffer = nvme_to_user_ptr(d.metadata); pdu->meta_len = d.metadata_len; - blk_execute_rq_nowait(req, 0, nvme_uring_cmd_end_io); + blk_execute_rq_nowait(req, false); return -EIOCBQUEUED; } diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 5a98a7de0964..0403b6d10bb4 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -1438,9 +1438,10 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved) } nvme_init_request(abort_req, &cmd); + abort_req->end_io = abort_endio; abort_req->end_io_data = NULL; abort_req->rq_flags |= RQF_QUIET; - blk_execute_rq_nowait(abort_req, false, abort_endio); + blk_execute_rq_nowait(abort_req, false); /* * The aborted req will be completed on receiving the abort req. @@ -2485,12 +2486,15 @@ static int nvme_delete_queue(struct nvme_queue *nvmeq, u8 opcode) return PTR_ERR(req); nvme_init_request(req, &cmd); + if (opcode == nvme_admin_delete_cq) + req->end_io = nvme_del_cq_end; + else + req->end_io = nvme_del_queue_end; req->end_io_data = nvmeq; init_completion(&nvmeq->delete_done); req->rq_flags |= RQF_QUIET; - blk_execute_rq_nowait(req, false, opcode == nvme_admin_delete_cq ? - nvme_del_cq_end : nvme_del_queue_end); + blk_execute_rq_nowait(req, false); return 0; } diff --git a/drivers/nvme/target/passthru.c b/drivers/nvme/target/passthru.c index 5247c24538eb..3cc4d6709c93 100644 --- a/drivers/nvme/target/passthru.c +++ b/drivers/nvme/target/passthru.c @@ -285,8 +285,9 @@ static void nvmet_passthru_execute_cmd(struct nvmet_req *req) req->p.rq = rq; queue_work(nvmet_wq, &req->p.work); } else { + rq->end_io = nvmet_passthru_req_done; rq->end_io_data = req; - blk_execute_rq_nowait(rq, false, nvmet_passthru_req_done); + blk_execute_rq_nowait(rq, false); } if (ns) |
