From: Hannes Reinecke <hare@suse.de>
To: James Bottomley <jbottomley@parallels.com>
Cc: linux-scsi@vger.kernel.org, Joern Engel <joern@logfs.org>,
Ewan Milne <emilne@redhat.com>,
James Smart <james.smart@emulex.com>,
Ren Mingxin <renmx@cn.fujitsu.com>,
Roland Dreier <roland@purestorage.com>,
Bryn Reeves <bmr@redhat.com>,
Christoph Hellwig <hch@infradead.org>,
Hannes Reinecke <hare@suse.de>
Subject: [PATCH 4/4] virtio_scsi: use improved eh timeout handler
Date: Thu, 6 Jun 2013 11:43:55 +0200 [thread overview]
Message-ID: <1370511835-50072-5-git-send-email-hare@suse.de> (raw)
In-Reply-To: <1370511835-50072-1-git-send-email-hare@suse.de>
Hook in the improved eh timeout handler for virtio.
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
drivers/scsi/virtio_scsi.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index 2168258..3fb588d 100644
--- a/drivers/scsi/virtio_scsi.c
+++ b/drivers/scsi/virtio_scsi.c
@@ -654,6 +654,12 @@ static int virtscsi_abort(struct scsi_cmnd *sc)
return virtscsi_tmf(vscsi, cmd);
}
+static enum blk_eh_timer_return virtscsi_timedout(struct scsi_cmnd *scmd)
+{
+ scsi_abort_command(scmd);
+ return BLK_EH_SCHEDULED;
+}
+
static int virtscsi_target_alloc(struct scsi_target *starget)
{
struct virtio_scsi_target_state *tgt =
@@ -683,6 +689,7 @@ static struct scsi_host_template virtscsi_host_template_single = {
.queuecommand = virtscsi_queuecommand_single,
.eh_abort_handler = virtscsi_abort,
.eh_device_reset_handler = virtscsi_device_reset,
+ .eh_timed_out = virtscsi_timedout,
.can_queue = 1024,
.dma_boundary = UINT_MAX,
@@ -699,6 +706,7 @@ static struct scsi_host_template virtscsi_host_template_multi = {
.queuecommand = virtscsi_queuecommand_multi,
.eh_abort_handler = virtscsi_abort,
.eh_device_reset_handler = virtscsi_device_reset,
+ .eh_timed_out = virtscsi_timedout,
.can_queue = 1024,
.dma_boundary = UINT_MAX,
--
1.7.12.4
next prev parent reply other threads:[~2013-06-06 9:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-06 9:43 [PATCH 0/4] New SCSI command timeout handler Hannes Reinecke
2013-06-06 9:43 ` [PATCH 1/4] scsi: move initialization of scmd->eh_entry Hannes Reinecke
2013-06-06 16:14 ` Jörn Engel
2013-06-06 9:43 ` [PATCH 2/4] blk-timeout: add BLK_EH_SCHEDULED return code Hannes Reinecke
2013-06-06 16:24 ` Jörn Engel
2013-06-06 9:43 ` [PATCH 3/4] scsi: improved eh timeout handler Hannes Reinecke
2013-06-06 16:23 ` Jörn Engel
2013-06-06 20:39 ` Hannes Reinecke
2013-06-06 20:28 ` Jörn Engel
2013-06-07 6:25 ` Ren Mingxin
2013-06-07 6:42 ` Hannes Reinecke
2013-06-07 16:21 ` Jörn Engel
2013-06-10 0:12 ` Baruch Even
2013-06-10 5:48 ` Hannes Reinecke
2013-06-06 9:43 ` Hannes Reinecke [this message]
2013-06-07 6:54 ` [PATCH 0/4] New SCSI command " Ren Mingxin
2013-06-07 7:31 ` Hannes Reinecke
2013-06-07 16:02 ` Jörn Engel
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=1370511835-50072-5-git-send-email-hare@suse.de \
--to=hare@suse.de \
--cc=bmr@redhat.com \
--cc=emilne@redhat.com \
--cc=hch@infradead.org \
--cc=james.smart@emulex.com \
--cc=jbottomley@parallels.com \
--cc=joern@logfs.org \
--cc=linux-scsi@vger.kernel.org \
--cc=renmx@cn.fujitsu.com \
--cc=roland@purestorage.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.