OSDN Git Service

nvme-fabrics: refactor queue ready check
authorChristoph Hellwig <hch@lst.de>
Mon, 11 Jun 2018 15:34:06 +0000 (17:34 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 15 Jun 2018 09:21:00 +0000 (11:21 +0200)
commit3bc32bb1186ccaf3177cbf29caa6cc14dc510b7b
tree72b01daec4fd9aad31e6768ba86789e79f420f48
parente6c3456aa897c9799de5423b28550efad14a51b0
nvme-fabrics: refactor queue ready check

Move the is_connected check to the fibre channel transport, as it has no
meaning for other transports.  To facilitate this split out a new
nvmf_fail_nonready_command helper that is called by the transport when
it is asked to handle a command on a queue that is not ready.

Also avoid a function call for the queue live fast path by inlining
the check.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: James Smart <james.smart@broadcom.com>
drivers/nvme/host/fabrics.c
drivers/nvme/host/fabrics.h
drivers/nvme/host/fc.c
drivers/nvme/host/rdma.c
drivers/nvme/target/loop.c