From: Long Li <longli@exchange.microsoft.com>
To: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
KY Srinivasan <kys@microsoft.com>,
Stephen Hemminger <sthemmin@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>
Cc: Long Li <longli@microsoft.com>
Subject: [PATCH] storvsc: use default I/O timeout handler for FC devices
Date: Mon, 12 Jun 2017 17:23:37 -0700 [thread overview]
Message-ID: <1497313417-14815-1-git-send-email-longli@exchange.microsoft.com> (raw)
From: Long Li <longli@microsoft.com>
FC disks are usually setup in a multipath system, and they don't want to
unconditionaly reset I/O on timeout. I/O timeout is detected by multipath
as a good time to failover and recover.
Signed-off-by: Long Li <longli@microsoft.com>
---
drivers/scsi/storvsc_drv.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 8d955db..d60b5ea 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -486,6 +486,7 @@ struct hv_host_device {
unsigned int port;
unsigned char path;
unsigned char target;
+ bool is_fc;
};
struct storvsc_scan_work {
@@ -1495,6 +1496,11 @@ static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd)
*/
static enum blk_eh_timer_return storvsc_eh_timed_out(struct scsi_cmnd *scmnd)
{
+ struct hv_host_device *host_dev = shost_priv(scmnd->device->host);
+
+ if (host_dev->is_fc)
+ return BLK_EH_NOT_HANDLED;
+
return BLK_EH_RESET_TIMER;
}
@@ -1738,6 +1744,7 @@ static int storvsc_probe(struct hv_device *device,
host_dev->port = host->host_no;
host_dev->dev = device;
+ host_dev->is_fc = is_fc;
stor_device = kzalloc(sizeof(struct storvsc_device), GFP_KERNEL);
--
2.7.4
next reply other threads:[~2017-06-13 0:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-13 0:23 Long Li [this message]
2017-06-13 8:13 ` [PATCH] storvsc: use default I/O timeout handler for FC devices Johannes Thumshirn
2017-06-13 15:38 ` [Possible Phish Fraud][PATCH] " Bart Van Assche
2017-06-13 19:16 ` Long Li
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=1497313417-14815-1-git-send-email-longli@exchange.microsoft.com \
--to=longli@exchange.microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=martin.petersen@oracle.com \
--cc=sthemmin@microsoft.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