From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH for-4.12-rc] nvme-rdma: fast fail incoming requests while we reconnect
Date: Tue, 6 Jun 2017 17:33:26 +0200 [thread overview]
Message-ID: <20170606153326.GA13763@lst.de> (raw)
In-Reply-To: <9e629028-98df-8165-6826-82fd497d7521@mellanox.com>
On Tue, Jun 06, 2017@04:46:52PM +0300, Max Gurtovoy wrote:
> hi,
>
>> -static inline bool nvme_rdma_queue_is_ready(struct nvme_rdma_queue *queue,
>> +static inline int nvme_rdma_queue_is_ready(struct nvme_rdma_queue *queue,
>> struct request *rq)
>> {
>> if (unlikely(!test_bit(NVME_RDMA_Q_LIVE, &queue->flags))) {
>> @@ -1441,11 +1443,22 @@ static inline bool nvme_rdma_queue_is_ready(struct nvme_rdma_queue *queue,
>>
>> if (!blk_rq_is_passthrough(rq) ||
>> cmd->common.opcode != nvme_fabrics_command ||
>> - cmd->fabrics.fctype != nvme_fabrics_type_connect)
>> - return false;
>> + cmd->fabrics.fctype != nvme_fabrics_type_connect) {
>> + /*
>> + * reconnecting state means transport disruption, which
>> + * can take a long time and even might fail permanently,
>> + * so we can't let incoming I/O be requeued forever.
>> + * fail it fast to allow upper layers a chance to
>> + * failover.
>> + */
>> + if (queue->ctrl->ctrl->state == NVME_CTRL_RECONNECTING)
>
> Sagi/Christoph,
> It should be queue->ctrl->ctrl.state.
>
> we are testing this patch also now.
I've fixed this up already. Especially as the earlier version got it
right :)
next prev parent reply other threads:[~2017-06-06 15:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-05 17:35 [PATCH for-4.12-rc] nvme-rdma: fast fail incoming requests while we reconnect Sagi Grimberg
2017-06-06 7:15 ` Christoph Hellwig
2017-06-06 13:46 ` Max Gurtovoy
2017-06-06 15:33 ` Christoph Hellwig [this message]
2017-06-06 18:28 ` Sagi Grimberg
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=20170606153326.GA13763@lst.de \
--to=hch@lst.de \
/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