nvme: rename is_shutdown flag to is_destructed
The shutdown flag is only used when resubmitting the AER, and it will not be updated when hot remove happened, so rename it to is_destructed. Change-Id: Iafc27bd6cb23a851ed6c96470a2a45546a399c88 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1254 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
4b23e3f2b9
commit
86c4d33fbc
@ -766,7 +766,6 @@ nvme_ctrlr_shutdown(struct spdk_nvme_ctrlr *ctrlr)
|
||||
if (csts.bits.shst == SPDK_NVME_SHST_COMPLETE) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "shutdown complete in %u milliseconds\n",
|
||||
ms_waited);
|
||||
ctrlr->is_shutdown = true;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1890,8 +1889,8 @@ nvme_ctrlr_async_event_cb(void *arg, const struct spdk_nvme_cpl *cpl)
|
||||
active_proc->aer_cb_fn(active_proc->aer_cb_arg, cpl);
|
||||
}
|
||||
|
||||
/* If the ctrlr is already shutdown, we should not send aer again */
|
||||
if (ctrlr->is_shutdown) {
|
||||
/* If the ctrlr was removed or in the destruct state, we should not send aer again */
|
||||
if (ctrlr->is_removed || ctrlr->is_destructed) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2564,7 +2563,7 @@ nvme_ctrlr_construct(struct spdk_nvme_ctrlr *ctrlr)
|
||||
ctrlr->free_io_qids = NULL;
|
||||
ctrlr->is_resetting = false;
|
||||
ctrlr->is_failed = false;
|
||||
ctrlr->is_shutdown = false;
|
||||
ctrlr->is_destructed = false;
|
||||
|
||||
TAILQ_INIT(&ctrlr->active_io_qpairs);
|
||||
STAILQ_INIT(&ctrlr->queued_aborts);
|
||||
@ -2617,6 +2616,8 @@ nvme_ctrlr_destruct(struct spdk_nvme_ctrlr *ctrlr)
|
||||
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NVME, "Prepare to destruct SSD: %s\n", ctrlr->trid.traddr);
|
||||
|
||||
ctrlr->is_destructed = true;
|
||||
|
||||
spdk_nvme_qpair_process_completions(ctrlr->adminq, 0);
|
||||
nvme_transport_admin_qpair_abort_aers(ctrlr->adminq);
|
||||
|
||||
|
@ -638,7 +638,7 @@ struct spdk_nvme_ctrlr {
|
||||
|
||||
bool is_failed;
|
||||
|
||||
bool is_shutdown;
|
||||
bool is_destructed;
|
||||
|
||||
bool timeout_enabled;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user