]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Enable retries for SYNCRONIZE_CACHE commands to fix I/O error
authorHannes Reinecke <hare@suse.de>
Tue, 4 May 2010 14:49:21 +0000 (16:49 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 12 May 2010 21:57:17 +0000 (14:57 -0700)
commit c213e1407be6b04b144794399a91472e0ef92aec upstream.

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 <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/scsi/sd.c

index 9093c7261f330085bf4ba843b18b8e53ad4270cd..7694a95bdb5361868a112ee6804bb2824f9f92c1 100644 (file)
@@ -971,6 +971,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;
 }