]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-tcp: handle number of queue changes
authorDaniel Wagner <dwagner@suse.de>
Mon, 29 Aug 2022 09:28:40 +0000 (11:28 +0200)
committerChristoph Hellwig <hch@lst.de>
Mon, 19 Sep 2022 15:55:19 +0000 (17:55 +0200)
commit076ff2dac3da004348d1a5054bfd2222a6b88677
treed47e12370df09117465420abb24e94ca0198c192
parent65b1e681754965b2100a2c407af619df2da08da3
nvme-tcp: handle number of queue changes

On reconnect, the number of queues might have changed.

In the case where we have more queues available than previously we try
to access queues which are not initialized yet.

The other case where we have less queues than previously, the
connection attempt will fail because the target doesn't support the
old number of queues and we end up in a reconnect loop.

Thus, only start queues which are currently present in the tagset
limited by the number of available queues. Then we update the tagset
and we can start any new queue.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/tcp.c