* [PATCH v2] nvme-tcp: don't poll a non-live queue
@ 2020-03-23 23:43 Sagi Grimberg
2020-03-24 16:19 ` Keith Busch
0 siblings, 1 reply; 2+ messages in thread
From: Sagi Grimberg @ 2020-03-23 23:43 UTC (permalink / raw)
To: linux-nvme, Keith Busch, Christoph Hellwig, Chaitanya Kulkarni
Cc: Mark Wunderlich
In error recovery we might be removing the queue so check we
can actually poll before we do.
Reported-by: Mark Wunderlich <mark.wunderlich@intel.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
---
Changes from v1:
- applies cleanly on nvme-5.6-rc6
drivers/nvme/host/tcp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index 80b3da7b7e02..8f944e2b0231 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -2295,6 +2295,9 @@ static int nvme_tcp_poll(struct blk_mq_hw_ctx *hctx)
struct nvme_tcp_queue *queue = hctx->driver_data;
struct sock *sk = queue->sock->sk;
+ if (!test_bit(NVME_TCP_Q_LIVE, &queue->flags))
+ return 0;
+
if (sk_can_busy_loop(sk) && skb_queue_empty_lockless(&sk->sk_receive_queue))
sk_busy_loop(sk, true);
nvme_tcp_try_recv(queue);
--
2.20.1
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] nvme-tcp: don't poll a non-live queue
2020-03-23 23:43 [PATCH v2] nvme-tcp: don't poll a non-live queue Sagi Grimberg
@ 2020-03-24 16:19 ` Keith Busch
0 siblings, 0 replies; 2+ messages in thread
From: Keith Busch @ 2020-03-24 16:19 UTC (permalink / raw)
To: Sagi Grimberg
Cc: Chaitanya Kulkarni, Mark Wunderlich, Christoph Hellwig, linux-nvme
On Mon, Mar 23, 2020 at 04:43:52PM -0700, Sagi Grimberg wrote:
> In error recovery we might be removing the queue so check we
> can actually poll before we do.
>
> Reported-by: Mark Wunderlich <mark.wunderlich@intel.com>
> Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Applied for 5.6, thanks.
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-24 16:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-23 23:43 [PATCH v2] nvme-tcp: don't poll a non-live queue Sagi Grimberg
2020-03-24 16:19 ` Keith Busch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).