Skip to content

Commit

Permalink
sd: fix a bug in deriving the FLUSH_TIMEOUT from the basic I/O timeout
Browse files Browse the repository at this point in the history
Commit ID: 7e66010 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@microsoft.com>
Reviewed-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
K. Y. Srinivasan authored and Christoph Hellwig committed Jul 25, 2014
1 parent c1d40a5 commit 26b9fd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ static int sd_setup_flush_cmnd(struct scsi_cmnd *cmd)
cmd->transfersize = 0;
cmd->allowed = SD_MAX_RETRIES;

rq->timeout *= SD_FLUSH_TIMEOUT_MULTIPLIER;
rq->timeout = rq->q->rq_timeout * SD_FLUSH_TIMEOUT_MULTIPLIER;
return BLKPREP_OK;
}

Expand Down

0 comments on commit 26b9fd8

Please sign in to comment.