lib/nvmf: don't raise assertion in nvmf_tgt_destroy_cb
While running into this function, even the subsystem can't be destroyed due to error subsystem state, it's better to continue the execution. Continue to fix #2590, QEMU is stuck for the failure case, and nvmf target should process such error because it may support other normal subsystems at the same time. Change-Id: Ib05e24996378b52070d2b760519f476f9b2d7e76 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13839 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by: Dong Yi <dongx.yi@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
3dd0bc9e09
commit
c60cb1a8be
@ -367,8 +367,7 @@ nvmf_tgt_destroy_cb(void *io_device)
|
||||
* is destroyed, nvmf_tgt_destroy_cb will continue to destroy other subsystems if any */
|
||||
return;
|
||||
} else {
|
||||
SPDK_ERRLOG("Failed to destroy subsystem, id %u, rc %d\n", tgt->subsystems[i]->id, rc);
|
||||
assert(0);
|
||||
SPDK_ERRLOG("Failed to destroy subsystem %s, rc %d\n", tgt->subsystems[i]->subnqn, rc);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -420,8 +420,8 @@ spdk_nvmf_subsystem_destroy(struct spdk_nvmf_subsystem *subsystem, nvmf_subsyste
|
||||
assert(spdk_get_thread() == subsystem->thread);
|
||||
|
||||
if (subsystem->state != SPDK_NVMF_SUBSYSTEM_INACTIVE) {
|
||||
SPDK_ERRLOG("Subsystem can only be destroyed in inactive state, current state %d\n",
|
||||
subsystem->state);
|
||||
SPDK_ERRLOG("Subsystem can only be destroyed in inactive state, %s state %d\n",
|
||||
subsystem->subnqn, subsystem->state);
|
||||
return -EAGAIN;
|
||||
}
|
||||
if (subsystem->destroying) {
|
||||
|
@ -260,7 +260,8 @@ _nvmf_tgt_subsystem_destroy(void *cb_arg)
|
||||
* is destroyed, _nvmf_tgt_subsystem_destroy will continue to destroy other subsystems if any */
|
||||
return;
|
||||
} else {
|
||||
SPDK_ERRLOG("Unable to destroy NVMe-oF subsystem, rc %d. Trying others.\n", rc);
|
||||
SPDK_ERRLOG("Unable to destroy subsystem %s, rc %d. Trying others.\n",
|
||||
spdk_nvmf_subsystem_get_nqn(subsystem), rc);
|
||||
}
|
||||
}
|
||||
subsystem = next_subsystem;
|
||||
|
Loading…
Reference in New Issue
Block a user