public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* ide-cd and bad sectors
@ 2005-07-02 14:14 matthieu castet
  2005-07-04 22:42 ` Jan Knutar
  2005-07-05 16:00 ` Alan Cox
  0 siblings, 2 replies; 5+ messages in thread
From: matthieu castet @ 2005-07-02 14:14 UTC (permalink / raw)
  To: Linux Kernel list

Hi,

I use 2.6.12 vanilla kernel.

Since some time when a disk has bad sector because it is damaged or 
overburned, the Linux kernel seem too hang for this device :
the process reading is unkillable (even with SIGKILL).
the kernel seem to try to read the next sectors, but always failed.

The only way to stop the kernel trying to read the disc is to reboot or 
don't lock the drive and eject it, with the button on the device.

When hard-ejecting it, there are something strange in the log : the 
kernel failed for 508 sector (is there a so big cache for disk request ? 
If this is the case that explain why the kernel seem too hang as it need 
1-2s per bad sector).
Also at the end of the log [1] you could see that the 2 last message 
report error for the first sectors that produce the error. Is that 
normal : I thought this sector already produced an "media error (bad 
sector)" and should be skipped ?


Also I was wondering if all the sector that ide-cd failed to read are 
bad sector, or if ide-cd failed to put the drive in a consistent state 
for reading the next sector after corrupted one.

IIRC on 2.4 kernel there wasn't such problem, I even managed to recover 
some damaged disk...

thanks

Matthieu


[1]
Jul  2 15:10:13 localhost kernel: hdc: media error (bad sector): 
status=0x51 { D
riveReady SeekComplete Error }
Jul  2 15:10:13 localhost kernel: hdc: media error (bad sector): 
error=0x30 { La
stFailedSense=0x03 }
Jul  2 15:10:13 localhost kernel: ide: failed opcode was: unknown
Jul  2 15:10:13 localhost kernel: end_request: I/O error, dev hdc, 
sector 119095
12
Jul  2 15:10:13 localhost kernel: printk: 105 messages suppressed.
Jul  2 15:10:13 localhost kernel: Buffer I/O error on device hdc, 
logical block
2977378
Jul  2 15:10:17 localhost kernel: hdc: media error (bad sector): 
status=0x51 { D
riveReady SeekComplete Error }
Jul  2 15:10:17 localhost kernel: hdc: media error (bad sector): 
error=0x30 { La
stFailedSense=0x03 }
Jul  2 15:10:17 localhost kernel: ide: failed opcode was: unknown
Jul  2 15:10:17 localhost kernel: end_request: I/O error, dev hdc, 
sector 119095
16
[...]
Jul  2 15:12:03 localhost kernel: hdc: tray open
Jul  2 15:12:03 localhost kernel: end_request: I/O error, dev hdc, 
sector 119100
16
Jul  2 15:12:03 localhost kernel: hdc: tray open
Jul  2 15:12:03 localhost kernel: end_request: I/O error, dev hdc, 
sector 119100
20
Jul  2 15:12:03 localhost kernel: hdc: tray open
Jul  2 15:12:03 localhost kernel: end_request: I/O error, dev hdc, 
sector 119095
12
Jul  2 15:12:03 localhost kernel: hdc: tray open
Jul  2 15:12:03 localhost kernel: end_request: I/O error, dev hdc, 
sector 119095
16

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ide-cd and bad sectors
  2005-07-02 14:14 ide-cd and bad sectors matthieu castet
@ 2005-07-04 22:42 ` Jan Knutar
  2005-07-05 16:00 ` Alan Cox
  1 sibling, 0 replies; 5+ messages in thread
From: Jan Knutar @ 2005-07-04 22:42 UTC (permalink / raw)
  To: matthieu castet; +Cc: Linux Kernel list

On Saturday 02 July 2005 17:14, matthieu castet wrote:

> IIRC on 2.4 kernel there wasn't such problem, I even managed to recover 
> some damaged disk...

Oh on some 2.4 the kernel would retry each sector so many times that recovering
undamaged sectors from a CD would have taken longer than the MTBF for a CDROM
drive :)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ide-cd and bad sectors
  2005-07-02 14:14 ide-cd and bad sectors matthieu castet
  2005-07-04 22:42 ` Jan Knutar
@ 2005-07-05 16:00 ` Alan Cox
  2005-07-05 18:21   ` matthieu castet
  1 sibling, 1 reply; 5+ messages in thread
From: Alan Cox @ 2005-07-05 16:00 UTC (permalink / raw)
  To: matthieu castet; +Cc: Linux Kernel Mailing List

On Sad, 2005-07-02 at 15:14, matthieu castet wrote:
> Also I was wondering if all the sector that ide-cd failed to read are 
> bad sector, or if ide-cd failed to put the drive in a consistent state 
> for reading the next sector after corrupted one.

ide-cd wrongly errors all the sectors around an error, ide-scsi gets it
right if the IDE firmware does. I sent Bartlomiej patches to fix that
and I believe he accepted them


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ide-cd and bad sectors
  2005-07-05 16:00 ` Alan Cox
@ 2005-07-05 18:21   ` matthieu castet
  2005-07-06 20:09     ` Bill Davidsen
  0 siblings, 1 reply; 5+ messages in thread
From: matthieu castet @ 2005-07-05 18:21 UTC (permalink / raw)
  To: Alan Cox; +Cc: Linux Kernel Mailing List

Hi Alan,

Alan Cox wrote:
> On Sad, 2005-07-02 at 15:14, matthieu castet wrote:
> 
>>Also I was wondering if all the sector that ide-cd failed to read are 
>>bad sector, or if ide-cd failed to put the drive in a consistent state 
>>for reading the next sector after corrupted one.
> 
> 
> ide-cd wrongly errors all the sectors around an error, ide-scsi gets it
> right if the IDE firmware does. I sent Bartlomiej patches to fix that
> and I believe he accepted them
> 
thanks,

they don't seem to be in his tree : 
http://www.kernel.org/git/?p=linux%2Fkernel%2Fgit%2Fbart%2Fide-2.6.git&a=search&s=ide-cd 
:(

Matthieu

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ide-cd and bad sectors
  2005-07-05 18:21   ` matthieu castet
@ 2005-07-06 20:09     ` Bill Davidsen
  0 siblings, 0 replies; 5+ messages in thread
From: Bill Davidsen @ 2005-07-06 20:09 UTC (permalink / raw)
  To: matthieu castet; +Cc: Linux Kernel Mailing List

matthieu castet wrote:
> Hi Alan,
> 
> Alan Cox wrote:
> 
>> On Sad, 2005-07-02 at 15:14, matthieu castet wrote:
>>
>>> Also I was wondering if all the sector that ide-cd failed to read are 
>>> bad sector, or if ide-cd failed to put the drive in a consistent 
>>> state for reading the next sector after corrupted one.
>>
>>
>>
>> ide-cd wrongly errors all the sectors around an error, ide-scsi gets it
>> right if the IDE firmware does. I sent Bartlomiej patches to fix that
>> and I believe he accepted them
>>
> thanks,
> 
> they don't seem to be in his tree : 
> http://www.kernel.org/git/?p=linux%2Fkernel%2Fgit%2Fbart%2Fide-2.6.git&a=search&s=ide-cd 
> :(
> 
> Matthieu
Alan, maybe you could send them again, it would be nice to have a 
useable ide-cd capability which doesn't prevent reading the good sectors 
on a CD.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-07-06 23:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-02 14:14 ide-cd and bad sectors matthieu castet
2005-07-04 22:42 ` Jan Knutar
2005-07-05 16:00 ` Alan Cox
2005-07-05 18:21   ` matthieu castet
2005-07-06 20:09     ` Bill Davidsen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox