From: Hannes Reinecke <hare@suse.de>
To: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: SYNCHRONIZE_CACHE command is not retried
Date: Tue, 04 May 2010 14:23:11 +0200 [thread overview]
Message-ID: <4BE011AF.7010509@suse.de> (raw)
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
next reply other threads:[~2010-05-04 12:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-04 12:23 Hannes Reinecke [this message]
2010-05-04 12:53 ` SYNCHRONIZE_CACHE command is not retried Bernd Schubert
2010-05-04 13:07 ` Hannes Reinecke
2010-05-04 14:33 ` James Bottomley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BE011AF.7010509@suse.de \
--to=hare@suse.de \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox