Re: Bug in linux kernel when playing DVDs.

From: Richard B. Johnson (root@chaos.analogic.com)
Date: Wed Apr 30 2003 - 07:29:14 EST


On Wed, 30 Apr 2003, Denis Vlasenko wrote:

> On 29 April 2003 14:11, James Courtier-Dutton wrote:
> > >See? Sector # is increasing... Linux retries the read several times,
> > >then reports EIO to userspace and goes to next sectors.
> > > Unfortunately, they are bad too, so the loop repeats. Eventually it
> > > will pass by all bad sectors (if not, it's a bug) but it can take
> > > longish time.
> > >
> > >Apart of making max retry # settable by the user, I don't see how
> > >this can be made better. Pity. This is common problem on CDs...
> >
> > What is this EIO report. The CPU is never returned to user space
> > apps, so the app never sees any error.
>
> Are you sure that CPU never returned to the app?
> (strace is your friend...)
>
> > As for retries, for DVD playing we do not want the Linux kernel to do
> > any retries, because during DVD playback, we just want a very quick
> > response saying there was an error.
>
> Kernel is not yet telepathic.
>
> > The DVD playing application can
> > then skip forward 0.5 seconds and continue. If one sector fails on a
> > DVD, there is little or not point in reading the next sector. One has
> > to start reading from the next VOBU. (i.e. about 0.5 seconds skip.)
>
> You need a way to tell kernel that you want such behavior.
> "skip 0.5 sec on error" requirement is rather hard
> to describe to the kernel.
> --
> vda

The usual way of reading DVDs is to ignore all errors! You need
to handle DVD errors differently than CD/ROM errors. With CDs,
it is expected that all data that is read is perfect. With
DVDs, this is not the case. The implimentation problem becomes
one of how to tell the kernel that the combined DVD/CDROM is
one or the other. I don't know what W$ does about this, but
on my Compaq lap-top, DVDs just stream right along, even though
there are whole corrupted frames, while the same drive containing
a defective CD will retry practically forever.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips).
Why is the government concerned about the lunatic fringe? Think about it.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Apr 30 2003 - 22:00:34 EST