linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Niel Lambrechts <niel.lambrechts@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	"linux.kernel" <linux-kernel@vger.kernel.org>,
	Theodore Tso <tytso@mit.edu>
Subject: Re: 2.6.29 regression: ATA bus errors on resume
Date: Wed, 27 May 2009 09:07:32 +0900	[thread overview]
Message-ID: <4A1C8444.9040605@kernel.org> (raw)
In-Reply-To: <4A1C316C.9040201@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2087 bytes --]

Niel Lambrechts wrote:
> On 05/26/2009 03:33 PM, Tejun Heo wrote:
>> Niel Lambrechts wrote:
>>   
>>> If you send some patches I'll make every effort to test, it beats having
>>> to re-install, my installation is just too customized. :)
>>>      
>> First, let's make sure we aren't balking up the wrong tree.  Can you
>> please apply the attached patch and report the kernel log?
> 
> Hi Tejun,
> 
> Okay it took 5 attempts, some of during which I played audio, did 'find
> /'  etc. but I still do not have a clue whether the extra activity
> helped trigger it or not.

Thanks for testing.

 XXX scmd->result=0x8000002 ff_t=4 ff_dev=2 ff_drv=8
 XXX DID_OK
 XXX CHECK_CONDITION, returning ff_dev
 sd 0:0:0:0: [sda] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
 sd 0:0:0:0: [sda] Sense Key : Aborted Command [current] [descriptor]
 Descriptor sense data with sense descriptors (in hex):
	 72 0b 00 00 00 00 00 0c 00 0a 80 00 00 00 00 00 
	 09 b8 71 d1 
 sd 0:0:0:0: [sda] Add. Sense: No additional sense information
 end_request: I/O error, dev sda, sector 242190447

The above is the offending failure and all three failfast bits are
set.  This corresponds to the following ATA exception.

 ata1.00: cmd 60/08:18:6f:88:6f/01:00:0e:00:00/40 tag 3 ncq 135168 in
	  res 50/00:40:d1:71:b8/00:00:09:00:00/40 Emask 0x10 (ATA bus error)

It's 33 page long read command.  Looking at the code the only way all
three fastfail bits can be set seems to be if the request is readahead
- the first part of block/blk-core.c::init_request_from_bio().  Now,
the failure of a readahead request isn't supposed to cause any
problem.  If it fails, well, it fails and things should go on as if
nothing happened.

Can you please try the attached patch?  It takes suspend/resume cycle
out of the equation and simply induces artificial failure to readahead
requests.  It's currently set to fail every 40th readahead.  Feel free
to adjust the frequency as you see fit.  catting files into /dev/null
would trigger readahead to kick in.  Can you reproduce filesystem
failure with this alone?

Thanks.

-- 
tejun

[-- Attachment #2: fail-readahead.patch --]
[-- Type: text/x-patch, Size: 722 bytes --]

diff --git a/block/blk-core.c b/block/blk-core.c
index c89883b..9b11aea 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -163,8 +163,18 @@ static void req_bio_endio(struct request *rq, struct bio *bio,
 		if (bio_integrity(bio))
 			bio_integrity_advance(bio, nbytes);
 
-		if (bio->bi_size == 0)
+		if (bio->bi_size == 0) {
+			static unsigned cnt;
+			if (bio_rw_ahead(bio) && !error && !(++cnt % 40)) {
+				printk("XXX %s: failing readahead bio, "
+				       "sec=%llu f=0x%lx rw=0x%lx\n",
+				       rq->rq_disk ? rq->rq_disk->disk_name : "?",
+				       (unsigned long long)bio->bi_sector,
+				       bio->bi_flags, bio->bi_rw);
+				error = -EIO;
+			}
 			bio_endio(bio, error);
+		}
 	} else {
 
 		/*

  reply	other threads:[~2009-05-27  0:06 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <clqON-2Xv-7@gated-at.bofh.it>
     [not found] ` <clqON-2Xv-9@gated-at.bofh.it>
     [not found]   ` <clqON-2Xv-11@gated-at.bofh.it>
     [not found]     ` <clqON-2Xv-13@gated-at.bofh.it>
     [not found]       ` <clqON-2Xv-15@gated-at.bofh.it>
     [not found]         ` <clqON-2Xv-17@gated-at.bofh.it>
     [not found]           ` <clqON-2Xv-19@gated-at.bofh.it>
     [not found]             ` <clqON-2Xv-5@gated-at.bofh.it>
     [not found]               ` <clqYt-3bu-5@gated-at.bofh.it>
2009-03-30 18:24                 ` 2.6.29 regression: ATA bus errors on resume Niel Lambrechts
2009-03-30 19:17                   ` Jeff Garzik
     [not found]               ` <cmknZ-8lW-9@gated-at.bofh.it>
     [not found]                 ` <cmoBl-6Ok-21@gated-at.bofh.it>
     [not found]                   ` <cmp4n-7rb-15@gated-at.bofh.it>
     [not found]                     ` <cmsYg-5BR-27@gated-at.bofh.it>
     [not found]                       ` <cmvW7-1Yj-23@gated-at.bofh.it>
     [not found]                         ` <cnheh-3vO-7@gated-at.bofh.it>
     [not found]                           ` <cnPg1-7Q4-19@gated-at.bofh.it>
     [not found]                             ` <cnTWo-7bV-25@gated-at.bofh.it>
     [not found]                               ` <co1Kd-350-5@gated-at.bofh.it>
     [not found]                                 ` <co2Qf-4QQ-27@gated-at.bofh.it>
     [not found]                                   ` <co4yj-7Mc-5@gated-at.bofh.it>
     [not found]                                     ` <cp71c-4py-29@gated-at.bofh.it>
     [not found]                                       ` <cEVyE-re-1@gated-at.bofh.it>
2009-05-23  9:36                                         ` Niel Lambrechts
2009-05-25  1:10                                           ` Tejun Heo
2009-05-25  8:15                                             ` Alan Cox
2009-05-25 22:06                                               ` Niel Lambrechts
2009-05-26  4:58                                                 ` Tejun Heo
2009-05-26  5:43                                                   ` Niel Lambrechts
2009-05-26  5:50                                                     ` Tejun Heo
2009-05-26  6:13                                                       ` Niel Lambrechts
2009-05-26 13:33                                                         ` Tejun Heo
2009-05-26 18:14                                                           ` Niel Lambrechts
2009-05-27  0:07                                                             ` Tejun Heo [this message]
2009-05-27 14:01                                                               ` Niel Lambrechts
2009-06-01 18:57                                                                 ` Niel Lambrechts
2009-06-03  3:14                                                                   ` Tejun Heo
2009-06-03  4:28                                                                     ` Tejun Heo
2009-06-06  7:05                                                                       ` Niel Lambrechts
2009-06-19 15:04                                                                         ` Pavel Machek
2009-06-25 12:57                                                                         ` Tejun Heo
2009-06-25 15:25                                                                           ` Niel Lambrechts
2009-06-26  0:46                                                                             ` Tejun Heo
2009-06-26  6:24                                                                               ` Niel Lambrechts
2009-09-18 20:26                                                                                 ` Berthold Gunreben
2009-09-25  4:11                                                                                   ` Tejun Heo
2009-09-30  9:58                                                                                     ` Berthold Gunreben
2009-09-30 10:26                                                                                       ` Tejun Heo
2009-05-26  4:58                                               ` Tejun Heo
     [not found] <ckpL0-3TE-3@gated-at.bofh.it>
     [not found] ` <ckpL0-3TE-5@gated-at.bofh.it>
     [not found]   ` <ckpL0-3TE-7@gated-at.bofh.it>
     [not found]     ` <ckpL0-3TE-9@gated-at.bofh.it>
     [not found]       ` <ckpL0-3TE-11@gated-at.bofh.it>
     [not found]         ` <ckpL0-3TE-1@gated-at.bofh.it>
     [not found]           ` <cllvN-2Gf-1@gated-at.bofh.it>
2009-03-30 14:30             ` Niel Lambrechts
2009-03-30 14:40               ` Jeff Garzik
2009-04-01 19:48                 ` Niel Lambrechts
2009-04-03 20:09                   ` Jeff Garzik
2009-04-03 20:54                     ` Niel Lambrechts
2009-04-02  1:50               ` Tejun Heo
2009-04-02  6:20                 ` Niel Lambrechts
2009-04-02  6:52                   ` Tejun Heo
2009-04-02 11:03                     ` Niel Lambrechts
2009-04-02 14:15                       ` Niel Lambrechts
2009-04-04  4:54                         ` Tejun Heo
2009-04-06  5:01                           ` Niel Lambrechts
2009-04-06 10:09                             ` Tejun Heo
2009-04-06 18:23                               ` Niel Lambrechts
2009-04-06 19:39                                 ` Tejun Heo
2009-04-06 21:26                                   ` Niel Lambrechts
2009-04-09 18:18                                     ` Tejun Heo
2009-05-23  9:17                                       ` Niel Lambrechts
     [not found] <cjtH6-3Ll-13@gated-at.bofh.it>
     [not found] ` <cjtH6-3Ll-15@gated-at.bofh.it>
     [not found]   ` <cjtH6-3Ll-11@gated-at.bofh.it>
     [not found]     ` <cjutt-577-11@gated-at.bofh.it>
     [not found]       ` <cjJCb-47c-23@gated-at.bofh.it>
2009-03-27 19:10         ` Niel Lambrechts
2009-03-27 22:30           ` Arjan van de Ven
2009-03-28 10:22             ` Niel Lambrechts
2009-03-28 14:06               ` Rafael J. Wysocki
2009-03-30  8:43                 ` Tejun Heo
2009-03-30  8:55           ` Tejun Heo
     [not found] <cjlqb-7sp-1@gated-at.bofh.it>
     [not found] ` <cjq6y-6sq-11@gated-at.bofh.it>
2009-03-25  5:19   ` 2.6.29 regression: ATA bus errors on resume (was: EXT4: __ext4_get_inode_loc errors after s2disk) Niel Lambrechts
2009-03-25  6:06     ` 2.6.29 regression: ATA bus errors on resume Jeff Garzik
2009-03-25 21:40       ` Niel Lambrechts
2009-03-25 22:16       ` 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=4A1C8444.9040605@kernel.org \
    --to=tj@kernel.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=niel.lambrechts@gmail.com \
    --cc=tytso@mit.edu \
    /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;
as well as URLs for NNTP newsgroup(s).