All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Ming Lei <ming.lei@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
	linux-nvme@lists.infradead.org
Subject: Re: [PATCH 1/2] blk-mq: introduce blk_mq_complete_request_sync()
Date: Mon, 18 Mar 2019 08:49:24 -0700	[thread overview]
Message-ID: <1552924164.152266.21.camel@acm.org> (raw)
In-Reply-To: <20190318151618.GA20371@ming.t460p>

On Mon, 2019-03-18 at 23:16 +0800, Ming Lei wrote:
> I am not familiar with SRP, could you explain what SRP initiator driver
> will do when the controller is in bad state? Especially about dealing with
> in-flight IO requests under this situation.

Hi Ming,

Just like the NVMeOF initiator driver, the SRP initiator driver uses an
RDMA RC connection for all of its communication over the network. If
communication between initiator and target fails the target driver will
close the connection or one of the work requests that was posted by the
initiator driver will complete with an error status (wc->status !=
IB_WC_SUCCESS). In the latter case the function srp_handle_qp_err() will
try to reestablish the connection between initiator and target after a
certain delay:

	if (delay > 0)
		queue_delayed_work(system_long_wq, &rport->reconnect_work,
				   1UL * delay * HZ);

SCSI timeouts may kick the SCSI error handler. That results in calls of
the srp_reset_device() and/or srp_reset_host() functions. srp_reset_host()
terminates all outstanding requests after having disconnected the RDMA RC
connection. Disconnecting the RC connection first guarantees that there
are no concurrent request completion calls from the regular completion
path and from the error handler.

Bart.

WARNING: multiple messages have this Message-ID (diff)
From: bvanassche@acm.org (Bart Van Assche)
Subject: [PATCH 1/2] blk-mq: introduce blk_mq_complete_request_sync()
Date: Mon, 18 Mar 2019 08:49:24 -0700	[thread overview]
Message-ID: <1552924164.152266.21.camel@acm.org> (raw)
In-Reply-To: <20190318151618.GA20371@ming.t460p>

On Mon, 2019-03-18@23:16 +0800, Ming Lei wrote:
> I am not familiar with SRP, could you explain what SRP initiator driver
> will do when the controller is in bad state? Especially about dealing with
> in-flight IO requests under this situation.

Hi Ming,

Just like the NVMeOF initiator driver, the SRP initiator driver uses an
RDMA RC connection for all of its communication over the network. If
communication between initiator and target fails the target driver will
close the connection or one of the work requests that was posted by the
initiator driver will complete with an error status (wc->status !=
IB_WC_SUCCESS). In the latter case the function srp_handle_qp_err() will
try to reestablish the connection between initiator and target after a
certain delay:

	if (delay > 0)
		queue_delayed_work(system_long_wq, &rport->reconnect_work,
				   1UL * delay * HZ);

SCSI timeouts may kick the SCSI error handler. That results in calls of
the srp_reset_device() and/or srp_reset_host() functions. srp_reset_host()
terminates all outstanding requests after having disconnected the RDMA RC
connection. Disconnecting the RC connection first guarantees that there
are no concurrent request completion calls from the regular completion
path and from the error handler.

Bart.

  reply	other threads:[~2019-03-18 15:49 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-18  3:29 [PATCH 0/2] blk-mq/nvme: cancel request synchronously Ming Lei
2019-03-18  3:29 ` Ming Lei
2019-03-18  3:29 ` [PATCH 1/2] blk-mq: introduce blk_mq_complete_request_sync() Ming Lei
2019-03-18  3:29   ` Ming Lei
2019-03-18  4:09   ` Bart Van Assche
2019-03-18  4:09     ` Bart Van Assche
2019-03-18  7:38     ` Ming Lei
2019-03-18  7:38       ` Ming Lei
2019-03-18 15:04       ` Bart Van Assche
2019-03-18 15:04         ` Bart Van Assche
2019-03-18 15:16         ` Ming Lei
2019-03-18 15:16           ` Ming Lei
2019-03-18 15:49           ` Bart Van Assche [this message]
2019-03-18 15:49             ` Bart Van Assche
2019-03-18 16:06             ` Ming Lei
2019-03-18 16:06               ` Ming Lei
2019-03-21  0:47             ` Sagi Grimberg
2019-03-21  0:47               ` Sagi Grimberg
2019-03-21  1:39               ` Ming Lei
2019-03-21  1:39                 ` Ming Lei
2019-03-21  2:04                 ` Sagi Grimberg
2019-03-21  2:04                   ` Sagi Grimberg
2019-03-21  2:32                   ` Ming Lei
2019-03-21  2:32                     ` Ming Lei
2019-03-21 21:40                     ` Sagi Grimberg
2019-03-21 21:40                       ` Sagi Grimberg
2019-03-27  8:27                       ` Christoph Hellwig
2019-03-27  8:27                         ` Christoph Hellwig
2019-03-21  2:15               ` Bart Van Assche
2019-03-21  2:15                 ` Bart Van Assche
2019-03-21  2:13       ` Sagi Grimberg
2019-03-21  2:13         ` Sagi Grimberg
2019-03-18 14:40     ` Keith Busch
2019-03-18 14:40       ` Keith Busch
2019-03-18 17:30     ` James Smart
2019-03-18 17:30       ` James Smart
2019-03-18 17:37   ` James Smart
2019-03-18 17:37     ` James Smart
2019-03-19  1:06     ` Ming Lei
2019-03-19  1:06       ` Ming Lei
2019-03-19  3:37       ` James Smart
2019-03-19  3:37         ` James Smart
2019-03-19  3:50         ` Ming Lei
2019-03-19  3:50           ` Ming Lei
2019-03-19  1:31     ` Ming Lei
2019-03-19  1:31       ` Ming Lei
2019-03-19  4:04       ` James Smart
2019-03-19  4:04         ` James Smart
2019-03-19  4:28         ` Ming Lei
2019-03-19  4:28           ` Ming Lei
2019-03-27  8:30   ` Christoph Hellwig
2019-03-27  8:30     ` Christoph Hellwig
2019-03-18  3:29 ` [PATCH 2/2] nvme: cancel request synchronously Ming Lei
2019-03-18  3:29   ` Ming Lei
2019-03-27  8:30   ` Christoph Hellwig
2019-03-27  8:30     ` Christoph Hellwig
2019-03-27  2:06 ` [PATCH 0/2] blk-mq/nvme: " Ming Lei
2019-03-27  2:06   ` Ming Lei

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=1552924164.152266.21.camel@acm.org \
    --to=bvanassche@acm.org \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=ming.lei@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.