Messages in this thread | | | From | "Guangyu Kang (Shanghai)" <> | Subject | RE: Help please: DVD ROM read difficulty | Date | Fri, 7 Mar 2003 15:49:27 +0800 |
| |
Elladan, thank you for your reply :)
>I've had to try junk like: > > while true ; do kill -9 $stupid_process ; done > >.. just to get something to die when it's reading bad media. >A quick way around this tends to be to hit the eject button on the CD >drive itself - it will cause the driver to abort the read quickly when >it sees that the drive is empty.
You are quite right, this is exactly what I got. Maybe the cache mechanism will do some check before send request to the ide-cd driver, and it will abort at that point, since there is an path for the failure report.
While to me, this issue is some how player quality related, I have to deal with it. And you said that the error handling is not good at all, I think its hopeless for me to hack into fs and cache. Now I have an idea in mind to implement an ioctl() set to do this. Looks like: CDROM_IOCTL_LOCK CDROM_IOCTRL_REALTIME_LOGICBLOCK_READ The lock will make the driver refuse any more open to the driver, thus the driver can concdern on read operation from my ioctl while not the reauest. If some one opened the driver already, lock will fail. The read will be an re-organize of request handler code, adding more straight-forward error handling, which will get data from drive and copy it to user. Without the cache layer, in player case, better performance may be the additional gain.
Ugly though, this should be some how easier.
Any comment and advice is welcomed! - 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/
| |