From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Jens Axboe <axboe@kernel.dk>
Cc: Linus Torvalds <torvalds@osdl.org>, Jens Axboe <axboe@suse.de>,
Jeff Garzik <jeff@garzik.org>,
Sergei Shtylyov <sshtylyov@ru.mvista.com>,
linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@osdl.org>
Subject: Re: What's in libata-dev.git
Date: Tue, 12 Sep 2006 00:00:36 +0100 [thread overview]
Message-ID: <1158015636.23085.218.camel@localhost.localdomain> (raw)
In-Reply-To: <20060911195106.GA6775@kernel.dk>
Ar Llu, 2006-09-11 am 21:51 +0200, ysgrifennodd Jens Axboe:
> Well, as I said, I don't think we ever saw a case that was demonstrably
> due to the 256 sector issue. And I really don't think it is as obscure a
> fact that people seem to think it is.
One of the ones I've got saved here is this thread. Paul goes on to
demonstrate that changing the 255<->256 limit makes 2.0/2.2/2.4 break or
not break.
--------
There is a potentially serious bug in ide-probe.c in which max_sectors
is set to 256 instead of 255. I am surprised that this hasn't bit anyone
else yet. Perhaps because you need a disk that is slow in comparison to
the host in order for the queue to climb up to and then hit the 256, at
which point it then falls over.
For example, with an old 700MB Maxtor on a "fast" 486, VL-bus, PIO,
hdparm -c1 -m8 -u1, I could pretty much on demand generate the
following
error by multiple builds, or by the final linking of any big project:
hdc: lost interrupt
hdc: status error: status=0x58 { DriveReady SeekComplete DataRequest }
hdc: drive not ready for command
<user space sees binary cruft in source files, etc etc...>
(Note that nothing in the status is really an error). With the
following
patch, everything works as it should & no errors even under high load.
Patch is against 2.4.3pre2.
Paul.
--- drivers/ide/ide-probe.c~ Sat Mar 17 16:50:14 2001
+++ drivers/ide/ide-probe.c Sat Mar 17 16:58:33 2001
@@ -1,5 +1,5 @@
/*
- * linux/drivers/ide/ide-probe.c Version 1.06 June 9, 2000
+ * linux/drivers/ide/ide-probe.c Version 1.07 March 18, 2001
*
* Copyright (C) 1994-1998 Linus Torvalds & authors (see below)
*/
@@ -25,6 +25,8 @@
* allowed for secondary flash card to be detectable
* with new flag : drive->ata_flash : 1;
* Version 1.06 stream line request queue and prep for cascade project.
+ * Version 1.07 max_sect <= 255; slower disks would get behind and
+ * then fall over when they get to 256. Paul G.
*/
#undef REALLY_SLOW_IO /* most systems can safely undef this */
@@ -772,10 +774,10 @@
for (unit = 0; unit < minors; ++unit) {
*bs++ = BLOCK_SIZE;
#ifdef CONFIG_BLK_DEV_PDC4030
- *max_sect++ = ((hwif->chipset == ide_pdc4030) ? 127 : 256);
+ *max_sect++ = ((hwif->chipset == ide_pdc4030) ? 127 : 255);
#else
/* IDE can do up to 128K per request. */
- *max_sect++ = 256;
+ *max_sect++ = 255;
#endif
*max_ra++ = MAX_READAHEAD;
}
next prev parent reply other threads:[~2006-09-11 22:40 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-11 13:22 What's in libata-dev.git Jeff Garzik
2006-09-11 13:35 ` Sergei Shtylyov
2006-09-11 13:37 ` Jeff Garzik
2006-09-11 13:47 ` Sergei Shtylyov
2006-09-11 13:49 ` Jeff Garzik
2006-09-11 14:53 ` Linus Torvalds
2006-09-11 15:24 ` Jeff Garzik
2006-09-12 8:42 ` Helge Hafting
2006-09-13 1:50 ` Tejun Heo
2006-09-11 15:02 ` Alan Cox
2006-09-11 14:44 ` Jeff Garzik
2006-09-11 15:05 ` Sergei Shtylyov
2006-09-11 15:28 ` Alan Cox
2006-09-11 15:21 ` Sergei Shtylyov
2006-09-11 15:37 ` Jens Axboe
2006-09-11 15:50 ` Jeff Garzik
2006-09-11 20:01 ` Jens Axboe
2006-09-11 20:14 ` Jeff Garzik
2006-09-11 20:23 ` Jens Axboe
2006-09-11 16:04 ` Linus Torvalds
2006-09-11 19:51 ` Jens Axboe
2006-09-11 23:00 ` Alan Cox [this message]
2006-09-11 22:53 ` Greg Freemyer
2006-09-12 5:22 ` Jens Axboe
2006-09-11 16:26 ` Alan Cox
2006-09-11 19:51 ` Jens Axboe
2006-09-11 15:06 ` Jens Axboe
2006-10-04 17:57 ` Mark Lord
2006-10-04 18:03 ` Sergei Shtylyov
2006-10-04 18:48 ` Mark Lord
-- strict thread matches above, loose matches on Subject: below --
2007-01-24 7:26 Jeff Garzik
2007-01-24 17:26 ` Mark Lord
2007-01-24 19:19 ` Jeff Garzik
2006-05-24 7:08 Jeff Garzik
2006-04-18 9:54 Jeff Garzik
2006-04-18 15:07 ` Bastiaan Jacques
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=1158015636.23085.218.camel@localhost.localdomain \
--to=alan@lxorguk.ukuu.org.uk \
--cc=akpm@osdl.org \
--cc=axboe@kernel.dk \
--cc=axboe@suse.de \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sshtylyov@ru.mvista.com \
--cc=torvalds@osdl.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;
as well as URLs for NNTP newsgroup(s).