lib/nvmf: Change nvmf_ctrlr_abort_aer() to set completion status of aborted I/O to ABORTED

nvmf_ctrlr_abort_aer() has not been used anywhere, and so we may be
able to remove it, but let's update it to set the completion status
of the aborted AERs to ABORTED for future potential use cases, and
then rename it by nvmf_ctrlr_abort_all_aer() to avoid name conflict
with the next patch.

Setting the completion status to SUCCESS is not good in this case
anyway.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie49936429b82dd05724cf8f10a1417e9c5304635
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2709
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Shuhei Matsumoto 2020-06-01 10:35:58 +09:00 committed by Tomasz Zawadzki
parent db96437e42
commit 55c39cd008

View File

@ -2500,10 +2500,16 @@ nvmf_qpair_free_aer(struct spdk_nvmf_qpair *qpair)
void
nvmf_ctrlr_abort_aer(struct spdk_nvmf_ctrlr *ctrlr)
{
struct spdk_nvmf_request *req;
int i;
for (i = 0; i < ctrlr->nr_aer_reqs; i++) {
_nvmf_request_complete(ctrlr->aer_req[i]);
req = ctrlr->aer_req[i];
req->rsp->nvme_cpl.status.sct = SPDK_NVME_SCT_GENERIC;
req->rsp->nvme_cpl.status.sc = SPDK_NVME_SC_ABORTED_BY_REQUEST;
_nvmf_request_complete(req);
ctrlr->aer_req[i] = NULL;
}