Skip to content

Commit

Permalink
nvme_pcie: Fix nvme_qpair_abort_all_queued_reqs() to be called for ad…
Browse files Browse the repository at this point in the history
…minq

By the patch spdk@736b9da
nvme_qpair_abort_all_queued_reqs() was changed to be called after the
adminq is actually disconnected.

However, the patch spdk@ac31590
unexpectedly disabled to call nvme_qpair_abort_all_queued_reqs() for
adminq because qpair->active_proc is NULL for adminq.

Add one more condition to nvme_transport_ctrlr_disconnect_qpair_done().

Fixes issue spdk#2928

Signed-off-by: Shuhei Matsumoto <[email protected]>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17001 (master)

(cherry picked from commit cb2a733)
Change-Id: Ic65f4cd952e6e89275788ff4b86ceca050f624d5
Signed-off-by: Krzysztof Karas <[email protected]>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17696
Reviewed-by: Ben Walker <[email protected]>
Tested-by: SPDK CI Jenkins <[email protected]>
Reviewed-by: Konrad Sztyber <[email protected]>
Reviewed-by: Jim Harris <[email protected]>
  • Loading branch information
shuhei-matsumoto authored and jimharris committed Apr 24, 2023
1 parent 240fa8e commit a62a5ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/nvme/nvme_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,8 @@ nvme_transport_ctrlr_disconnect_qpair(struct spdk_nvme_ctrlr *ctrlr, struct spdk
void
nvme_transport_ctrlr_disconnect_qpair_done(struct spdk_nvme_qpair *qpair)
{
if (qpair->active_proc == nvme_ctrlr_get_current_process(qpair->ctrlr)) {
if (qpair->active_proc == nvme_ctrlr_get_current_process(qpair->ctrlr) ||
nvme_qpair_is_admin_queue(qpair)) {
nvme_qpair_abort_all_queued_reqs(qpair, 0);
}
nvme_qpair_set_state(qpair, NVME_QPAIR_DISCONNECTED);
Expand Down

0 comments on commit a62a5ea

Please sign in to comment.