nvme-tcp: always fail a request when sending it failed
authorSagi Grimberg <sagi@grimberg.me>
Sun, 26 Jun 2022 09:24:51 +0000 (12:24 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 Jul 2022 19:24:35 +0000 (21:24 +0200)
commit1e4427aa2fc840a9549a9c751c436ef9ec7713b6
tree685675ffaf52444aa54a9ee2deb86b180e8e71df
parent8ab067462e09e0152c4ad2467c0c719d78f53583
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 <dwagner@suse.de>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/tcp.c