nvme-fabrics: introduce init command check for a queue that is not alive
authorSagi Grimberg <sagi@grimberg.me>
Tue, 24 Oct 2017 12:25:20 +0000 (15:25 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Feb 2018 16:38:57 +0000 (17:38 +0100)
commit26bd01c1affe663196e05302290c08f781d2e597
tree2fcf15e918e1e58cc33a73014f976cd5932dd0b0
parentd46e961f056aaec155bc3e21cf8e31449b5d2117
nvme-fabrics: introduce init command check for a queue that is not alive

[ Upstream commit 48832f8d58cfedb2f9bee11bbfbb657efb42e7e7 ]

When the fabrics queue is not alive and fully functional, no commands
should be allowed to pass but connect (which moves the queue to a fully
functional state). Any other command should be failed, with either
temporary status BLK_STS_RESOUCE or permanent status BLK_STS_IOERR.

This is shared across all fabrics, hence move the check to fabrics
library.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvme/host/fabrics.h
drivers/nvme/host/rdma.c