[PATCH 11/11] sd: fix a bug in deriving the FLUSH_TIMEOUT from the basic I/O timeout
Andy Whitcroft
apw at canonical.com
Wed Sep 24 09:00:47 UTC 2014
From: "K. Y. Srinivasan" <kys at microsoft.com>
Commit ID: 7e660100d85af860e7ad763202fff717adcdaacd added code to derive the
FLUSH_TIMEOUT from the basic I/O timeout. However, this patch did not use the
basic I/O timeout of the device. Fix this bug.
Signed-off-by: K. Y. Srinivasan <kys at microsoft.com>
Reviewed-by: James Bottomley <JBottomley at Parallels.com>
Signed-off-by: Christoph Hellwig <hch at lst.de>
(backported from commit 26b9fd8b3452dcf0a8862e307ee23f442f63fb51)
BugLink: http://bugs.launchpad.net/bugs/1354397
Conflicts:
drivers/scsi/sd.c
Signed-off-by: Andy Whitcroft <apw at canonical.com>
---
drivers/scsi/sd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 2735c50..fb949ee 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -830,7 +830,7 @@ static int sd_setup_write_same_cmnd(struct scsi_device *sdp, struct request *rq)
static int scsi_setup_flush_cmnd(struct scsi_device *sdp, struct request *rq)
{
- rq->timeout *= SD_FLUSH_TIMEOUT_MULTIPLIER;
+ rq->timeout = rq->q->rq_timeout * SD_FLUSH_TIMEOUT_MULTIPLIER;
rq->retries = SD_MAX_RETRIES;
rq->cmd[0] = SYNCHRONIZE_CACHE;
rq->cmd_len = 10;
--
1.9.1
More information about the kernel-team
mailing list