From ac94b60b54e8c7ebdcd2c731c156aa49d6cf991d Mon Sep 17 00:00:00 2001 From: Konrad Sztyber Date: Mon, 30 Jan 2023 15:47:33 +0100 Subject: [PATCH] nvme/tcp: fail qpair when spdk_sock_flush() fails If spdk_sock_flush() returns an error, there's no reason not to disconnect the qpair, as it usually means that that socket's connection has been terminated. Signed-off-by: Konrad Sztyber Change-Id: I54e9bebc38e2a24a3baf69eb18ec3c654b210318 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16644 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Aleksey Marchuk --- lib/nvme/nvme_tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nvme/nvme_tcp.c b/lib/nvme/nvme_tcp.c index 9c1795eca..ce5cd87c0 100644 --- a/lib/nvme/nvme_tcp.c +++ b/lib/nvme/nvme_tcp.c @@ -1752,7 +1752,7 @@ nvme_tcp_qpair_process_completions(struct spdk_nvme_qpair *qpair, uint32_t max_c if (spdk_unlikely(tqpair->qpair.ctrlr->timeout_enabled)) { nvme_tcp_qpair_check_timeout(qpair); } - return rc; + goto fail; } }