OSDN Git Service

nvme-loop: check if queue is ready in queue_rq
authorSagi Grimberg <sagi@grimberg.me>
Tue, 24 Oct 2017 12:25:22 +0000 (15:25 +0300)
committerChristoph Hellwig <hch@lst.de>
Mon, 20 Nov 2017 07:28:36 +0000 (08:28 +0100)
commit9d7fab04b95e8c26014a9bfc1c943b8360b44c17
treee3724bf21fa48b057b4c34eb95eed46eac33d035
parent9e0ed16ab9a9aaf670b81c9cd05b5e50defed654
nvme-loop: 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_LOOP_Q_LIVE which is set after nvmf connect
and cleared in queue teardown.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/loop.c