SYNCHRONIZE_CACHE command is not retried

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx			      +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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux