lkml.org 
[lkml]   [1996]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectSCSI-CD-Rom: Generic Read disables Media-Change-Detection!!!
Date

Hi,

I hope you can help me, its a quite annoying problem.

I am developing right now a CD-Writer-Program, which reads a lot from
CD-Rom (SCSI).
I read via a generic-scsi-call the TOC of the CD..and the generic-scsi
interface causes that the kernel (testet up to 1.3.93) that the media-change
isn't detected any longer!
So If I change CD and start to read RAW any data (with dd) to read the
Image to HD, the first few blocks (the ones that were cached) contain
the data from the wrong (previous) CD!

I don't know If this can be considered as Kernel-Bug...all I need
is a way to force the kernel to forget its cache and accpting the
new CD. (Force Change-Media, Flush all Buffers or so)
A simple sync doesn't help because it doesn't flush read-buffers...

The CD's are never mounted.
The only way I found so far, to read the new CD correctly is when
I cause a readfault on the CD..(by trying to mount it, when no CD is
in the drive)

I tested the behavior on a few Computers with different SCSI-Cd-Roms and
Controllers (Adaptec 1542B, NCR53c810),
all the same..


Please tell me how to I can solve this...Perhaps there is a ioctl that
helps? Or patching the sg.c in the kernel to invalidate all buffers
when closing the generic-scsi-device?
I am not a kernel-hacker, I am not sure how to fix that.

I also posted a similar "bug-report" to linux.dev.scsi and linux.dev.kernel...
I waited a few days but nobody answered..

Many thanx,

Thomas Niederreiter


___ ___
/ | \ ___________ | REAL : Thomas Niederreiter: Munich, Germany
/ ~ \/ _ \_ __ \ | EMAIL : p7003ad@sunmail.lrz-muenchen.de
\ Y ( <_> ) | \/ | MUD/IRC: Hor/_Hor
\___|_ / \____/|__| |
\/ All I want is a warm bed and a kind word and unlimited power
-- Ashleigh Brilliant



\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.022 / U:0.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site