From: james.smart@broadcom.com (James Smart)
Subject: [PATCH 1/4] nvme-fabrics: refactor queue ready check
Date: Wed, 13 Jun 2018 12:48:10 -0700 [thread overview]
Message-ID: <7362f54b-e4c8-0040-f7de-9ed7845216a8@broadcom.com> (raw)
In-Reply-To: <20180611154647.32558-2-hch@lst.de>
On 6/11/2018 8:46 AM, Christoph Hellwig wrote:
> diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
> index 0bad65803271..7a4afbd22b8a 100644
> --- a/drivers/nvme/host/fc.c
> +++ b/drivers/nvme/host/fc.c
> @@ -2279,14 +2279,13 @@ nvme_fc_queue_rq(struct blk_mq_hw_ctx *hctx,
> struct nvme_fc_cmd_iu *cmdiu = &op->cmd_iu;
> struct nvme_command *sqe = &cmdiu->sqe;
> enum nvmefc_fcp_datadir io_dir;
> + bool queue_ready = test_bit(NVME_FC_Q_LIVE, &queue->flags);
> u32 data_len;
> blk_status_t ret;
>
> - ret = nvmf_check_if_ready(&queue->ctrl->ctrl, rq,
> - test_bit(NVME_FC_Q_LIVE, &queue->flags),
> - ctrl->rport->remoteport.port_state == FC_OBJSTATE_ONLINE);
> - if (unlikely(ret))
> - return ret;
> + if (ctrl->rport->remoteport.port_state != FC_OBJSTATE_ONLINE ||
> + nvmf_check_ready(&queue->ctrl->ctrl, rq, queue_ready))
> + return nvmf_fail_nonready_command(rq);
>
> ret = nvme_setup_cmd(ns, rq, sqe);
> if (ret)
>
This is missing the ! on the nvmf_check_ready() call. Should be:
+ if (ctrl->rport->remoteport.port_state != FC_OBJSTATE_ONLINE ||
+ !nvmf_check_ready(&queue->ctrl->ctrl, rq, queue_ready))
+ return nvmf_fail_nonready_command(rq);
other transports had it right.
-- james
next prev parent reply other threads:[~2018-06-13 19:48 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-11 15:46 queue ready fixes and cleanups Christoph Hellwig
2018-06-11 15:46 ` [PATCH 1/4] nvme-fabrics: refactor queue ready check Christoph Hellwig
2018-06-12 8:23 ` Johannes Thumshirn
2018-06-12 21:45 ` James Smart
2018-06-13 8:16 ` Christoph Hellwig
2018-06-13 15:54 ` James Smart
2018-06-14 12:19 ` Christoph Hellwig
2018-06-13 19:48 ` James Smart [this message]
2018-06-11 15:46 ` [PATCH 2/4] nvme-fabrics: handle queue ready fast path inline Christoph Hellwig
2018-06-12 8:24 ` Johannes Thumshirn
2018-06-12 21:47 ` James Smart
2018-06-11 15:46 ` [PATCH 3/4] nvme-fabrics: handle the admin-only case properly in nvmf_check_ready Christoph Hellwig
2018-06-12 8:25 ` Johannes Thumshirn
2018-06-12 21:48 ` James Smart
2018-06-13 7:59 ` Christoph Hellwig
2018-06-11 15:46 ` [PATCH 4/4] nvme-fabrics: reverse polarity in __nvmf_check_ready Christoph Hellwig
2018-06-12 8:26 ` Johannes Thumshirn
2018-06-12 11:08 ` Hannes Reinecke
2018-06-12 22:22 ` James Smart
2018-06-12 22:05 ` James Smart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7362f54b-e4c8-0040-f7de-9ed7845216a8@broadcom.com \
--to=james.smart@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox