Skip to content

Commit

Permalink
Merge tag 'nvme-5.17-2022-02-10' of git://git.infradead.org/nvme into…
Browse files Browse the repository at this point in the history
… block-5.17

Pull NVMe fixes from Christoph:

"nvme fixes for Linux 5.17

 - nvme-tcp: fix bogus request completion when failing to send AER
   (Sagi Grimberg)
 - add the missing nvme_complete_req tracepoint for batched completion
   (Bean Huo)"

* tag 'nvme-5.17-2022-02-10' of git://git.infradead.org/nvme:
  nvme-tcp: fix bogus request completion when failing to send AER
  nvme: add nvme_complete_req tracepoint for batched completion
  • Loading branch information
Jens Axboe committed Feb 10, 2022
2 parents b13e0c7 + 6357380 commit 93e2c52
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions drivers/nvme/host/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ EXPORT_SYMBOL_GPL(nvme_complete_rq);

void nvme_complete_batch_req(struct request *req)
{
trace_nvme_complete_rq(req);
nvme_cleanup_cmd(req);
nvme_end_req_zoned(req);
}
Expand Down
10 changes: 9 additions & 1 deletion drivers/nvme/host/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,15 @@ static inline void nvme_tcp_done_send_req(struct nvme_tcp_queue *queue)

static void nvme_tcp_fail_request(struct nvme_tcp_request *req)
{
nvme_tcp_end_request(blk_mq_rq_from_pdu(req), NVME_SC_HOST_PATH_ERROR);
if (nvme_tcp_async_req(req)) {
union nvme_result res = {};

nvme_complete_async_event(&req->queue->ctrl->ctrl,
cpu_to_le16(NVME_SC_HOST_PATH_ERROR), &res);
} else {
nvme_tcp_end_request(blk_mq_rq_from_pdu(req),
NVME_SC_HOST_PATH_ERROR);
}
}

static int nvme_tcp_try_send_data(struct nvme_tcp_request *req)
Expand Down

0 comments on commit 93e2c52

Please sign in to comment.