From: Sagi Grimberg Date: Sun, 26 Jun 2022 09:24:51 +0000 (+0300) Subject: nvme-tcp: always fail a request when sending it failed X-Git-Tag: v5.15.73~2239 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e4427aa2fc840a9549a9c751c436ef9ec7713b6;p=platform%2Fkernel%2Flinux-rpi.git nvme-tcp: always fail a request when sending it failed [ Upstream commit 41d07df7de841bfbc32725ce21d933ad358f2844 ] queue stoppage and inflight requests cancellation is fully fenced from io_work and thus failing a request from this context. Hence we don't need to try to guess from the socket retcode if this failure is because the queue is about to be torn down or not. We are perfectly safe to just fail it, the request will not be cancelled later on. This solves possible very long shutdown delays when the users issues a 'nvme disconnect-all' Reported-by: Daniel Wagner Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig Signed-off-by: Sasha Levin --- diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index 10882d3..1821d38 100644 --- a/drivers/nvme/host/tcp.c +++ b/drivers/nvme/host/tcp.c @@ -1162,8 +1162,7 @@ done: } else if (ret < 0) { dev_err(queue->ctrl->ctrl.device, "failed to send request %d\n", ret); - if (ret != -EPIPE && ret != -ECONNRESET) - nvme_tcp_fail_request(queue->request); + nvme_tcp_fail_request(queue->request); nvme_tcp_done_send_req(queue); } return ret;