diff options
author | Hannes Reinecke <hare@suse.de> | 2010-05-04 16:49:21 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-12 14:57:17 -0700 |
commit | f3dc6becaa6b5efdb5756cf6f47b724c9b32df0b (patch) | |
tree | 43df347a0656131682b9b46bf9ab76327967b003 | |
parent | cc9a23629f1a9733b58abd3a0fb6eb3f18c20532 (diff) | |
download | lwn-f3dc6becaa6b5efdb5756cf6f47b724c9b32df0b.tar.gz lwn-f3dc6becaa6b5efdb5756cf6f47b724c9b32df0b.zip |
Enable retries for SYNCRONIZE_CACHE commands to fix I/O error
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>
-rw-r--r-- | drivers/scsi/sd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 9093c7261f33..7694a95bdb53 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -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; } |