Skip to content

Commit

Permalink
nvme-fabrics: handle the admin-only case properly in nvmf_check_ready
Browse files Browse the repository at this point in the history
In the ADMIN_ONLY state we don't have any I/O queues, but we should accept
all admin commands without further checks.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: James Smart <james.smart@broadcom.com>
  • Loading branch information
Christoph Hellwig committed Jun 15, 2018
1 parent 3bc32bb commit 278ab37
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/nvme/host/fabrics.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ bool __nvmf_check_ready(struct nvme_ctrl *ctrl, struct request *rq,
static inline bool nvmf_check_ready(struct nvme_ctrl *ctrl, struct request *rq,
bool queue_live)
{
if (likely(ctrl->state == NVME_CTRL_LIVE))
if (likely(ctrl->state == NVME_CTRL_LIVE ||
ctrl->state == NVME_CTRL_ADMIN_ONLY))
return true;
return __nvmf_check_ready(ctrl, rq, queue_live);
}
Expand Down

0 comments on commit 278ab37

Please sign in to comment.