Commit e1958e65 authored by Ming Lin's avatar Ming Lin Committed by Jens Axboe

nvme: update and rename nvme_cancel_io to nvme_cancel_request

nvme_cancel_io is a bit confusing (given the distinction of io/admin),
so rename it to nvme_cancel_request.

And update it a bit to pass in struct nvme_ctrl, so it can be used
by Fabrics driver also.
Signed-off-by: default avatarMing Lin <ming.l@samsung.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Suggested-by: default avatarSagi Grimberg <sagi@grimberg.me>
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: default avatarKeith Busch <keith.bsuch@intel.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 28a8f0d3
...@@ -919,14 +919,14 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved) ...@@ -919,14 +919,14 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
return BLK_EH_RESET_TIMER; return BLK_EH_RESET_TIMER;
} }
static void nvme_cancel_io(struct request *req, void *data, bool reserved) static void nvme_cancel_request(struct request *req, void *data, bool reserved)
{ {
int status; int status;
if (!blk_mq_request_started(req)) if (!blk_mq_request_started(req))
return; return;
dev_dbg_ratelimited(((struct nvme_dev *) data)->ctrl.device, dev_dbg_ratelimited(((struct nvme_ctrl *) data)->device,
"Cancelling I/O %d", req->tag); "Cancelling I/O %d", req->tag);
status = NVME_SC_ABORT_REQ; status = NVME_SC_ABORT_REQ;
...@@ -1722,8 +1722,8 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown) ...@@ -1722,8 +1722,8 @@ static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown)
} }
nvme_pci_disable(dev); nvme_pci_disable(dev);
blk_mq_tagset_busy_iter(&dev->tagset, nvme_cancel_io, dev); blk_mq_tagset_busy_iter(&dev->tagset, nvme_cancel_request, &dev->ctrl);
blk_mq_tagset_busy_iter(&dev->admin_tagset, nvme_cancel_io, dev); blk_mq_tagset_busy_iter(&dev->admin_tagset, nvme_cancel_request, &dev->ctrl);
mutex_unlock(&dev->shutdown_lock); mutex_unlock(&dev->shutdown_lock);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment