Re: 2.6.0, cdrom still showing directories after being erased

From: Thomas Glanzmann
Date: Thu Feb 05 2004 - 15:39:11 EST


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