]> Git Repo - linux.git/commitdiff
[SCSI] Enable retries for SYNCRONIZE_CACHE commands to fix I/O error
authorHannes Reinecke <[email protected]>
Tue, 4 May 2010 14:49:21 +0000 (16:49 +0200)
committerJames Bottomley <[email protected]>
Wed, 5 May 2010 16:13:26 +0000 (12:13 -0400)
Some arrays are giving I/O errors with ext3 filesystems when
SYNCHRONIZE_CACHE gets a UNIT_ATTENTION.  What is happening is that
these commands have no retries, so the UNIT_ATTENTION causes the
barrier to fail.  We should be enable retries here to clear any
transient error and allow the barrier to succeed.

Signed-off-by: Hannes Reinecke <[email protected]>
Cc: Stable Tree <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
drivers/scsi/sd.c

index 8b827f37b03ef95195be9736b9495cec6d390c5c..de6c60320f6ffb70f1b9d00a1677f1f36caabba0 100644 (file)
@@ -1040,6 +1040,7 @@ static void sd_prepare_flush(struct request_queue *q, struct request *rq)
 {
        rq->cmd_type = REQ_TYPE_BLOCK_PC;
        rq->timeout = SD_TIMEOUT;
+       rq->retries = SD_MAX_RETRIES;
        rq->cmd[0] = SYNCHRONIZE_CACHE;
        rq->cmd_len = 10;
 }
This page took 0.054992 seconds and 4 git commands to generate.