Commit 55c39cd0 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Tomasz Zawadzki
Browse files

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: default avatarShuhei 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: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent db96437e
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -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;
	}