Skip to content

Commit 41d07df

Browse files
sagigrimbergChristoph Hellwig
authored andcommitted
nvme-tcp: always fail a request when sending it failed
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 <[email protected]> Signed-off-by: Sagi Grimberg <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent ed0691c commit 41d07df

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/nvme/host/tcp.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,8 +1180,7 @@ static int nvme_tcp_try_send(struct nvme_tcp_queue *queue)
11801180
} else if (ret < 0) {
11811181
dev_err(queue->ctrl->ctrl.device,
11821182
"failed to send request %d\n", ret);
1183-
if (ret != -EPIPE && ret != -ECONNRESET)
1184-
nvme_tcp_fail_request(queue->request);
1183+
nvme_tcp_fail_request(queue->request);
11851184
nvme_tcp_done_send_req(queue);
11861185
}
11871186
return ret;

0 commit comments

Comments
 (0)