nvme: introduce nvme_is_fabrics to check fabrics cmd

This patch introduces a nvme_is_fabrics() inline function to check
whether or not the given command structure is for fabrics.

Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Esse commit está contido em:
Minwoo Im
2019-06-06 14:30:14 +09:00
commit de Christoph Hellwig
commit 7a1f46e3f7
5 arquivos alterados com 10 adições e 5 exclusões

Ver arquivo

@@ -578,7 +578,7 @@ bool __nvmf_check_ready(struct nvme_ctrl *ctrl, struct request *rq,
switch (ctrl->state) {
case NVME_CTRL_NEW:
case NVME_CTRL_CONNECTING:
if (req->cmd->common.opcode == nvme_fabrics_command &&
if (nvme_is_fabrics(req->cmd) &&
req->cmd->fabrics.fctype == nvme_fabrics_type_connect)
return true;
break;