* How to force cdrom driver to redetect media after cdrecord?
@ 2004-02-25 21:19 Byron Stanoszek
2004-02-26 6:55 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Byron Stanoszek @ 2004-02-25 21:19 UTC (permalink / raw)
To: linux-kernel; +Cc: axboe
> > I originally thought so, but maybe I was wrong. Jens posted a patch
> > to invalidate kernel buffers on an umount - if the problem persists
> > with that patch, I still believe it is a hardware fault.
>
> Perhaps another program has the device open still? In that case, we
> don't invalidate the toc cache.
>
> --
> Jens Axboe
Jens,
I ran into something similar today. I'd like to use cdrecord to write to a CD
and then immediately turn around and read from it for verification purposes...
...Except that I only get 2048 bytes from a 'cat /dev/scd0' until I take the CD
out and put it back in.
Is there a known way for a userland application to make an ioctl to the cdrom
device in a 2.4/2.6 kernel to tell it the media changed without forcing a tray
open & close?
I intend to execute a program with this ioctl (if there is such a thing) after
the cdrecord and before the 'cat'.
Thanks,
-Byron
--
Byron Stanoszek Ph: (330) 644-3059
Systems Programmer Fax: (330) 644-8110
Commercial Timesharing Inc. Email: byron@comtime.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How to force cdrom driver to redetect media after cdrecord?
2004-02-25 21:19 How to force cdrom driver to redetect media after cdrecord? Byron Stanoszek
@ 2004-02-26 6:55 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2004-02-26 6:55 UTC (permalink / raw)
To: Byron Stanoszek; +Cc: linux-kernel
On Wed, Feb 25 2004, Byron Stanoszek wrote:
> > > I originally thought so, but maybe I was wrong. Jens posted a patch
> > > to invalidate kernel buffers on an umount - if the problem persists
> > > with that patch, I still believe it is a hardware fault.
> >
> > Perhaps another program has the device open still? In that case, we
> > don't invalidate the toc cache.
> >
> > --
> > Jens Axboe
>
> Jens,
> I ran into something similar today. I'd like to use cdrecord to write
> to a CD and then immediately turn around and read from it for
> verification purposes...
>
> ...Except that I only get 2048 bytes from a 'cat /dev/scd0' until I
> take the CD out and put it back in.
>
> Is there a known way for a userland application to make an ioctl to
> the cdrom device in a 2.4/2.6 kernel to tell it the media changed
> without forcing a tray open & close?
>
> I intend to execute a program with this ioctl (if there is such a
> thing) after the cdrecord and before the 'cat'.
That should already work in 2.6 current, when the last program closes
the drive the toc is invalidated. For 2.4 you are probably out of luck,
use something like eject to open/close the tray.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-02-26 6:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-25 21:19 How to force cdrom driver to redetect media after cdrecord? Byron Stanoszek
2004-02-26 6:55 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox