OSDN Git Service

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)
committerChristoph Hellwig <hch@lst.de>
Mon, 20 Nov 2017 07:28:35 +0000 (08:28 +0100)
commit9e0ed16ab9a9aaf670b81c9cd05b5e50defed654
tree596c6fcd7c046a2c4f51913f9b1701edc76e9a3f
parent48832f8d58cfedb2f9bee11bbfbb657efb42e7e7
nvme-fc: check if queue is ready in queue_rq

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>
drivers/nvme/host/fc.c