nvme-fc: check if queue is ready in queue_rq
authorSagi Grimberg <sagi@grimberg.me>
Tue, 24 Oct 2017 12:25:21 +0000 (15:25 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Feb 2018 16:38:58 +0000 (17:38 +0100)
commitdb2044fc42305d2f8f92f24e16f223b66dff6cfe
treee1d658d43b82c15d583d48308e548c6741f11d34
parent26bd01c1affe663196e05302290c08f781d2e597
nvme-fc: check if queue is ready in queue_rq

[ Upstream commit 9e0ed16ab9a9aaf670b81c9cd05b5e50defed654 ]

In case the queue is not LIVE (fully functional and connected at the nvmf
level), we cannot allow any commands other than connect to pass through.

Add a new queue state flag NVME_FC_Q_LIVE which is set after nvmf connect
and cleared in queue teardown.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: James Smart <james.smart@broadcom.com>
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/fc.c