From: Hannes Reinecke <hare@suse.de>
To: James Bottomley <jbottomley@parallels.com>
Cc: Christoph Hellwig <hch@infradead.org>,
linux-scsi@vger.kernel.org, Ren Mingxin <renmx@cn.fujitsu.com>,
Joern Engel <joern@logfs.org>,
James Smart <james.smart@emulex.com>,
Hannes Reinecke <hare@suse.de>
Subject: [PATCH 2/4] blk-timeout: add BLK_EH_SCHEDULED return code
Date: Wed, 30 Oct 2013 09:37:50 +0100 [thread overview]
Message-ID: <1383122272-93572-3-git-send-email-hare@suse.de> (raw)
In-Reply-To: <1383122272-93572-1-git-send-email-hare@suse.de>
Add a 'BLK_EH_SCHEDULED' return code for blk-timeout to indicate
that a delayed error recovery has been initiated.
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
drivers/scsi/scsi_error.c | 4 ++++
include/linux/blkdev.h | 1 +
2 files changed, 5 insertions(+)
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 67c0014..af51a9c 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -161,6 +161,10 @@ enum blk_eh_timer_return scsi_times_out(struct request *req)
else if (host->hostt->eh_timed_out)
rtn = host->hostt->eh_timed_out(scmd);
+ /* Check for asynchronous command aborts */
+ if (rtn == BLK_EH_SCHEDULED)
+ return BLK_EH_NOT_HANDLED;
+
scmd->result |= DID_TIME_OUT << 16;
if (unlikely(rtn == BLK_EH_NOT_HANDLED &&
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 0e6f765..afec57c 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -238,6 +238,7 @@ enum blk_eh_timer_return {
BLK_EH_NOT_HANDLED,
BLK_EH_HANDLED,
BLK_EH_RESET_TIMER,
+ BLK_EH_SCHEDULED,
};
typedef enum blk_eh_timer_return (rq_timed_out_fn)(struct request *);
--
1.8.1.4
next prev parent reply other threads:[~2013-10-30 8:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-30 8:37 [PATCHv7 0/4] New EH command timeout handler Hannes Reinecke
2013-10-30 8:37 ` [PATCH 1/4] scsi: Fix erratic device offline during EH Hannes Reinecke
2013-10-30 8:37 ` Hannes Reinecke [this message]
2013-10-30 8:43 ` [PATCH 2/4] blk-timeout: add BLK_EH_SCHEDULED return code Christoph Hellwig
2013-10-30 19:15 ` Hannes Reinecke
2013-10-30 8:37 ` [PATCH 3/4] scsi: improved eh timeout handler Hannes Reinecke
2013-10-30 8:37 ` [PATCH 4/4] scsi: Update documentation Hannes Reinecke
-- strict thread matches above, loose matches on Subject: below --
2013-06-06 9:43 [PATCH 0/4] New SCSI command timeout handler Hannes Reinecke
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-05-24 9:50 [PATCH 0/4] New FC timeout handler Hannes Reinecke
2013-05-24 9:50 ` [PATCH 2/4] blk-timeout: add BLK_EH_SCHEDULED return code Hannes Reinecke
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=1383122272-93572-3-git-send-email-hare@suse.de \
--to=hare@suse.de \
--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 \
/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.