public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* SYNCHRONIZE_CACHE command is not retried
@ 2010-05-04 12:23 Hannes Reinecke
  2010-05-04 12:53 ` Bernd Schubert
  0 siblings, 1 reply; 4+ messages in thread
From: Hannes Reinecke @ 2010-05-04 12:23 UTC (permalink / raw)
  To: SCSI Mailing List

Hi all,

I'm facing an issue here where the 'SYNCHRONIZE CACHE' command is not retried:

[  652.602637] sd 0:0:0:0: [sda] Send: 
[  652.602640] sd 0:0:0:0: [sda] CDB: Synchronize Cache(10): 35 00 00 00 00 00 00 00 00 00
[  652.604943] sd 0:0:0:0: [sda] Done: SUCCESS
[  652.604947] sd 0:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_OK
[  652.604951] sd 0:0:0:0: [sda] CDB: Synchronize Cache(10): 35 00 00 00 00 00 00 00 00 00
[  652.604958] sd 0:0:0:0: [sda] Sense Key : Unit Attention [current] 
[  652.604962] sd 0:0:0:0: [sda] Add. Sense: Reported luns data has changed
[  652.604972] sd 0:0:0:0: [sda] Send: 
[  652.604974] sd 0:0:0:0: [sda] CDB: Write(10): 2a 08 01 58 7b d6 00 00 08 00
[  652.605176] sd 0:0:0:0: [sda] Done: SUCCESS
[  652.605179] sd 0:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_OK
[  652.605182] sd 0:0:0:0: [sda] CDB: Write(10): 2a 08 01 58 7b d6 00 00 08 00
[  652.605190] end_request: I/O error, dev sda, sector 22576086
[  652.605194] Buffer I/O error on device sda2, logical block 2295882
[  652.605196] lost page write due to I/O error on sda2
[  652.605207] Aborting journal on device sda2.

The 'SYNCHRONIZE CACHE' command is being inserted due to sd.c:

static void sd_prepare_flush(struct request_queue *q, struct request *rq)
{
	rq->cmd_type = REQ_TYPE_BLOCK_PC;
	rq->timeout = SD_TIMEOUT;
	rq->cmd[0] = SYNCHRONIZE_CACHE;
	rq->cmd_len = 10;
}

However, as the command type is set to REQ_TYPE_BLOCK_PC, the request is
not retried from the SCSI midlayer, but rather passed back upwards.
'Upwards' here being the block layer, which has no truck with retrying.
Bad.
The same sense code is retried when it occurs during normal READ/WRITE
commands.
So it really would make sense to have it retried here, too.
Shouldn't the flush command being marked as 'REQ_TYPE_SPECIAL' here?

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-05-04 14:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-04 12:23 SYNCHRONIZE_CACHE command is not retried Hannes Reinecke
2010-05-04 12:53 ` Bernd Schubert
2010-05-04 13:07   ` Hannes Reinecke
2010-05-04 14:33     ` James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox