From: James Bottomley <James.Bottomley@SteelEye.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Neil Brown <neilb@suse.de>, Andrew Morton <akpm@osdl.org>,
Grant Wilson <grant.wilson@zen.co.uk>,
linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: 2.6.17-mm5
Date: Sat, 01 Jul 2006 19:10:42 -0500 [thread overview]
Message-ID: <1151799042.3438.40.camel@mulgrave.il.steeleye.com> (raw)
In-Reply-To: <20060701225639.GC12703@havoc.gtf.org>
On Sat, 2006-07-01 at 18:56 -0400, Jeff Garzik wrote:
> On Sun, Jul 02, 2006 at 08:32:28AM +1000, Neil Brown wrote:
> > The problem seems to be simply that on some hardware at least,
> > BIO_RW_BARRIER writes result in an EIO. Don't know why yet.
>
> Could be that <whatever device> is choking on FLUSH CACHE (ATA)
> or SYNCHRONIZE CACHE (SCSI).
>
> That's one possible reason why EIO may result from a barrier...
There is no barrier implementation on SCSI (basically you can't maintain
barriers in the face of TCQ, so only depth one devices can do it and
hence all the scsi drivers turn it off), so it must be a FLUSH CACHE.
This one looks like it went down via prepare_flush rather than
issue_flush, so the normal error printing case that issue flush has is
skipped. This patch should tell us what the error was on the command.
James
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 3d04a9f..3e3e3b7 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1162,7 +1162,20 @@ static int scsi_issue_flush_fn(request_q
static void scsi_blk_pc_done(struct scsi_cmnd *cmd)
{
+ int res = cmd->result;
+ struct scsi_sense_hdr sshdr;
+
BUG_ON(!blk_pc_request(cmd->request));
+ if (!res) {
+ printk(KERN_ERR "REQ_BLOCK_PC FAILED for ");
+ __scsi_print_command(cmd->cmnd);
+ printk(KERN_ERR "FAILED\n status = %x, message = %02x, "
+ "host = %d, driver = %02x\n ",
+ status_byte(res), msg_byte(res),
+ host_byte(res), driver_byte(res));
+ if (scsi_command_normalize_sense(cmd, &sshdr))
+ scsi_print_sense_hdr("sd", &sshdr);
+ }
/*
* This will complete the whole command with uptodate=1 so
* as far as the block layer is concerned the command completed
James
next prev parent reply other threads:[~2006-07-02 0:11 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20060701033524.3c478698.akpm@osdl.org>
[not found] ` <20060701142419.GB28750@tlg.swandive.local>
2006-07-01 21:30 ` 2.6.17-mm5 Andrew Morton
2006-07-01 22:26 ` 2.6.17-mm5 James Bottomley
2006-07-01 22:32 ` 2.6.17-mm5 Neil Brown
2006-07-01 22:56 ` 2.6.17-mm5 Jeff Garzik
2006-07-02 0:10 ` James Bottomley [this message]
2006-07-01 22:29 ` More RAID / SATA / barrier problems [ Re: 2.6.17-mm5 ] Neil Brown
2006-07-01 22:54 ` 2.6.17-mm5 Jeff Garzik
2006-07-27 21:02 ` 2.6.17-mm5 Ming Zhang
[not found] ` <20060701181455.GA16412@aitel.hist.no>
2006-07-01 22:22 ` 2.6.17-mm5 dislikes raid-1, just like mm4 Andrew Morton
2006-07-01 22:52 ` Jeff Garzik
2006-07-01 22:58 ` Andrew Morton
2006-07-02 4:43 ` Reuben Farrelly
2006-07-02 6:09 ` Andrew Morton
2006-07-02 5:13 ` Reuben Farrelly
2006-07-02 13:53 ` James Bottomley
2006-07-02 14:28 ` Grant Wilson
2006-07-02 15:06 ` James Bottomley
2006-07-02 15:43 ` Grant Wilson
2006-07-02 19:07 ` Helge Hafting
2006-07-03 6:52 ` Reuben Farrelly
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=1151799042.3438.40.camel@mulgrave.il.steeleye.com \
--to=james.bottomley@steeleye.com \
--cc=akpm@osdl.org \
--cc=grant.wilson@zen.co.uk \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=neilb@suse.de \
/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