nvmf: add internal set Controller Fatal Status API
Change-Id: I6a11962311433e2e1d98ec6b58a1734876857df9 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11675 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
2049e54926
commit
a19e5b4dae
@ -198,7 +198,7 @@ nvmf_ctrlr_keep_alive_poll(void *ctx)
|
||||
ctrlr->hostnqn, ctrlr->subsys->subnqn);
|
||||
/* set the Controller Fatal Status bit to '1' */
|
||||
if (ctrlr->vcprop.csts.bits.cfs == 0) {
|
||||
ctrlr->vcprop.csts.bits.cfs = 1;
|
||||
nvmf_ctrlr_set_fatal_status(ctrlr);
|
||||
|
||||
/*
|
||||
* disconnect qpairs, terminate Transport connection
|
||||
@ -974,7 +974,7 @@ _nvmf_ctrlr_cc_reset_shn_done(void *ctx)
|
||||
} else {
|
||||
/* controller fatal status */
|
||||
SPDK_WARNLOG("IO timeout, ctrlr %p is in fatal status\n", ctrlr);
|
||||
ctrlr->vcprop.csts.bits.cfs = 1;
|
||||
nvmf_ctrlr_set_fatal_status(ctrlr);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1056,6 +1056,12 @@ spdk_nvmf_ctrlr_get_regs(struct spdk_nvmf_ctrlr *ctrlr)
|
||||
return &ctrlr->vcprop;
|
||||
}
|
||||
|
||||
void
|
||||
nvmf_ctrlr_set_fatal_status(struct spdk_nvmf_ctrlr *ctrlr)
|
||||
{
|
||||
ctrlr->vcprop.csts.bits.cfs = 1;
|
||||
}
|
||||
|
||||
static uint64_t
|
||||
nvmf_prop_get_cap(struct spdk_nvmf_ctrlr *ctrlr)
|
||||
{
|
||||
|
@ -496,6 +496,8 @@ void nvmf_qpair_free_aer(struct spdk_nvmf_qpair *qpair);
|
||||
|
||||
int nvmf_ctrlr_abort_request(struct spdk_nvmf_request *req);
|
||||
|
||||
void nvmf_ctrlr_set_fatal_status(struct spdk_nvmf_ctrlr *ctrlr);
|
||||
|
||||
static inline struct spdk_nvmf_ns *
|
||||
_nvmf_subsystem_get_ns(struct spdk_nvmf_subsystem *subsystem, uint32_t nsid)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user