nvme: Remove poll_group_disconnect_qpair() call from poll_group_remove()

spdk_nvme_poll_group_remove() is available only for disconnected
qpairs now. Hence spdk_nvme_poll_group_remove() does not have to
check if qpair is connected and call nvme_ctrlr_disconnect_qpair().

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I3b05246c4be6adfa3392b8f0e5ecaf274a8a7795
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10846
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
This commit is contained in:
Shuhei Matsumoto 2021-12-24 00:24:16 +09:00 committed by Tomasz Zawadzki
parent ea2db5bb0c
commit 4c8ccb5403
2 changed files with 3 additions and 8 deletions

View File

@ -2686,9 +2686,7 @@ static int
nvme_rdma_poll_group_remove(struct spdk_nvme_transport_poll_group *tgroup,
struct spdk_nvme_qpair *qpair)
{
if (qpair->poll_group_tailq_head == &tgroup->connected_qpairs) {
return nvme_poll_group_disconnect_qpair(qpair);
}
assert(qpair->poll_group_tailq_head == &tgroup->disconnected_qpairs);
return 0;
}

View File

@ -2284,18 +2284,15 @@ nvme_tcp_poll_group_remove(struct spdk_nvme_transport_poll_group *tgroup,
struct spdk_nvme_qpair *qpair)
{
struct nvme_tcp_qpair *tqpair;
int rc = 0;
if (qpair->poll_group_tailq_head == &tgroup->connected_qpairs) {
rc = nvme_poll_group_disconnect_qpair(qpair);
}
assert(qpair->poll_group_tailq_head == &tgroup->disconnected_qpairs);
tqpair = nvme_tcp_qpair(qpair);
assert(tqpair->shared_stats == true);
tqpair->stats = &g_dummy_stats;
return rc;
return 0;
}
static int64_t