public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 2.6.0, cdrom still showing directories after being erased
@ 2004-02-03 13:18 Martin Povolný
  2004-02-03 13:31 ` Måns Rullgård
  2004-02-03 13:45 ` Richard B. Johnson
  0 siblings, 2 replies; 46+ messages in thread
From: Martin Povolný @ 2004-02-03 13:18 UTC (permalink / raw)
  To: linux-kernel

I have debian's 2.6.0-686-smp only with PNP BIOS disabled (fails to
boot with enabled, as described by other people).

I did

$ mount /cdrom/
$ ls /cdrom/

got listing of files and directories on the cdrom
then

$ cdrecord dev=/dev/hdc -blank=fast -v
...
Blanking time:   21.570s
$ mount /cdrom
$ ls /cdrom

got the listing again!
could even 'cd' to a directory, couldn't read files

$ umount /cdrom
$ eject /cdrom; eject -t /cdrom
$ mount /cdrom

now I got the error which I would expect after erasing the CD and trying
to mount it

seems to me like some cache should have been invalidated, but was not

cdrecord:
    Cdrecord-Clone 2.01a19 (i686-pc-linux-gnu)
cdrom:
    0,0,0     0) 'HL-DT-ST' 'RW/DVD GCC-4480B' '1.00' Removable CD-ROM

p.s. sorry if I'm reporting something already repaired, but I have
searched the archive, changelog and asked google before writing here

-- 
Martin Povolný, xpovolny@fi.muni.cz, http://www.fi.muni.cz/~xpovolny

^ permalink raw reply	[flat|nested] 46+ messages in thread
* Re: 2.6.0, cdrom still showing directories after being erased
@ 2004-02-05 20:33 Thomas Glanzmann
  2004-02-05 20:54 ` Jens Axboe
  0 siblings, 1 reply; 46+ messages in thread
From: Thomas Glanzmann @ 2004-02-05 20:33 UTC (permalink / raw)
  To: LKML

Hi,

> now I got the error which I would expect after erasing the CD and trying
> to mount it

> seems to me like some cache should have been invalidated, but was not

I hit at this problem while I was writing an IDE Atapi simulator for
FAUmachine. The problem is that the kernel asks the CDROM if the 'disc
has changed', which means that the disc was ejected and reinserted, and
if this *isn't* the case the vfs or whatever assumes that the media
hasn't changed and so the buffers will not be flushed. You can cirumvent
this problem if you just eject and load the media back again.

And this isn't an issue of the cdrom (because my virtual cdrom on
FAUmachine has no buffer) but an issue of the kernel caching.

The linux kernel atapi layer makes a TEST UNIT READY and if the media
has changed the cdrom does return an ERR_STAT with a UNIT_ATTENTION
which means that the medium has changed. IF that this the case the
kernel flushes it's buffers.

	Thomas

^ permalink raw reply	[flat|nested] 46+ messages in thread
* Re: 2.6.0, cdrom still showing directories after being erased
@ 2004-02-05 21:24 Thomas Glanzmann
  2004-02-05 21:31 ` Jens Axboe
  0 siblings, 1 reply; 46+ messages in thread
From: Thomas Glanzmann @ 2004-02-05 21:24 UTC (permalink / raw)
  To: LKML

Hi,

> Okay, we may be dealing with the buggy hardware at this point. Would
> it make sense to tell the drive to flush it caches? If there's no
> other possibility, we might want cdrecord to reset drive at the end of
> blank and/or to make it eject...

It's not the drive, it's the kernel. We have to tell the kernel to
*flush* *it's* buffers when doing an umount. See my other posting.

	Thomas

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

end of thread, other threads:[~2004-02-15 15:23 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-03 13:18 2.6.0, cdrom still showing directories after being erased Martin Povolný
2004-02-03 13:31 ` Måns Rullgård
2004-02-03 13:45 ` Richard B. Johnson
2004-02-03 15:00   ` Tomas Zvala
2004-02-03 15:24     ` Richard B. Johnson
2004-02-03 15:45       ` Tomas Zvala
2004-02-03 16:02       ` John Bradford
2004-02-03 16:17         ` Måns Rullgård
2004-02-03 16:35           ` John Bradford
2004-02-03 17:46             ` Martin Povolný
2004-02-03 18:02               ` Martin Povolný
2004-02-03 18:53               ` John Bradford
2004-02-03 19:03                 ` Måns Rullgård
2004-02-03 20:35                   ` Richard B. Johnson
2004-02-03 20:59                     ` John Bradford
2004-02-03 22:40                     ` Jens Axboe
2004-02-03 23:05                       ` Martin Schlemmer
2004-02-04  7:37                         ` John Bradford
2004-02-05 23:31                           ` Eduard Bloch
2004-02-06  7:58                             ` John Bradford
2004-02-08 10:15                               ` Eduard Bloch
2004-02-08 10:32                                 ` Jens Axboe
2004-02-08 11:06                                 ` John Bradford
2004-02-03 22:03                   ` Måns Rullgård
2004-02-03 19:31               ` Tomas Zvala
2004-02-03 19:09             ` Derek Foreman
2004-02-03 19:51               ` Martin Povolný
2004-02-03 19:56                 ` Fox!MURDER
     [not found]                   ` <Pine.LNX.4.58.0402031358450.770@uberdeity>
2004-02-03 21:07                     ` Tomas Zvala
2004-02-03 15:28     ` Jens Axboe
2004-02-05 18:23       ` Pavel Machek
2004-02-05 20:04         ` John Bradford
2004-02-05 21:06           ` Pavel Machek
2004-02-05 21:36             ` John Bradford
2004-02-05 20:41         ` Jens Axboe
2004-02-05 21:09           ` Pavel Machek
2004-02-05 21:12             ` Jens Axboe
2004-02-05 21:17               ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2004-02-05 20:33 Thomas Glanzmann
2004-02-05 20:54 ` Jens Axboe
2004-02-05 21:16   ` Thomas Glanzmann
2004-02-05 21:29     ` Jens Axboe
2004-02-05 21:41     ` John Bradford
2004-02-13 23:19   ` Pavel Machek
2004-02-05 21:24 Thomas Glanzmann
2004-02-05 21:31 ` Jens Axboe

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