nvme: make helper function to abort outstanding err reqs
The nvme_qpair_disable functions will be going away in an upcoming patch, so move this one bit of functionality into a helper function in advance. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I61c2de535c2230b988d56dea13b00f39cb59dcfa Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453483 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
f366e261a6
commit
74aa552ef9
@ -844,6 +844,11 @@ spdk_nvme_ctrlr_reset(struct spdk_nvme_ctrlr *ctrlr)
|
|||||||
|
|
||||||
nvme_transport_admin_qpair_abort_aers(ctrlr->adminq);
|
nvme_transport_admin_qpair_abort_aers(ctrlr->adminq);
|
||||||
|
|
||||||
|
nvme_qpair_complete_error_reqs(ctrlr->adminq);
|
||||||
|
TAILQ_FOREACH(qpair, &ctrlr->active_io_qpairs, tailq) {
|
||||||
|
nvme_qpair_complete_error_reqs(qpair);
|
||||||
|
}
|
||||||
|
|
||||||
/* Disable all queues before disabling the controller hardware. */
|
/* Disable all queues before disabling the controller hardware. */
|
||||||
nvme_qpair_disable(ctrlr->adminq);
|
nvme_qpair_disable(ctrlr->adminq);
|
||||||
TAILQ_FOREACH(qpair, &ctrlr->active_io_qpairs, tailq) {
|
TAILQ_FOREACH(qpair, &ctrlr->active_io_qpairs, tailq) {
|
||||||
|
@ -831,6 +831,7 @@ int nvme_qpair_init(struct spdk_nvme_qpair *qpair, uint16_t id,
|
|||||||
void nvme_qpair_deinit(struct spdk_nvme_qpair *qpair);
|
void nvme_qpair_deinit(struct spdk_nvme_qpair *qpair);
|
||||||
void nvme_qpair_enable(struct spdk_nvme_qpair *qpair);
|
void nvme_qpair_enable(struct spdk_nvme_qpair *qpair);
|
||||||
void nvme_qpair_disable(struct spdk_nvme_qpair *qpair);
|
void nvme_qpair_disable(struct spdk_nvme_qpair *qpair);
|
||||||
|
void nvme_qpair_complete_error_reqs(struct spdk_nvme_qpair *qpair);
|
||||||
int nvme_qpair_submit_request(struct spdk_nvme_qpair *qpair,
|
int nvme_qpair_submit_request(struct spdk_nvme_qpair *qpair,
|
||||||
struct nvme_request *req);
|
struct nvme_request *req);
|
||||||
|
|
||||||
|
@ -580,7 +580,7 @@ nvme_qpair_enable(struct spdk_nvme_qpair *qpair)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nvme_qpair_disable(struct spdk_nvme_qpair *qpair)
|
nvme_qpair_complete_error_reqs(struct spdk_nvme_qpair *qpair)
|
||||||
{
|
{
|
||||||
struct nvme_request *req;
|
struct nvme_request *req;
|
||||||
|
|
||||||
@ -591,7 +591,11 @@ nvme_qpair_disable(struct spdk_nvme_qpair *qpair)
|
|||||||
req->cpl.status.sct,
|
req->cpl.status.sct,
|
||||||
req->cpl.status.sc, true);
|
req->cpl.status.sc, true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
nvme_qpair_disable(struct spdk_nvme_qpair *qpair)
|
||||||
|
{
|
||||||
nvme_transport_qpair_disable(qpair);
|
nvme_transport_qpair_disable(qpair);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -262,6 +262,11 @@ nvme_qpair_disable(struct spdk_nvme_qpair *qpair)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
nvme_qpair_complete_error_reqs(struct spdk_nvme_qpair *qpair)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nvme_qpair_enable(struct spdk_nvme_qpair *qpair)
|
nvme_qpair_enable(struct spdk_nvme_qpair *qpair)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user