Re: Partital Fix: Media-Change after generic-scsi-read

Peter Fox (fox@roestock.demon.co.uk)
Mon, 29 Apr 1996 19:12:23 GMT


Thomas Niederreiter <tn@bv.rz.fh-muenchen.de> wrote:

> I do now force the kernel upon closing the sg-device to invalidate
> the read-cache. I know this is brute-force attack, but it works me.

> This patch is missing a very important thing...The right device have
> to be invalidated, so if you worked with /dev/sgd, the kernel must
> find out that this corresponds to /dev/sr0 and invalidate /dev/sr0.
> I hardcoded in the moment /dev/sr0....

I think all removable media should do this. It is a pain to have to eject
the floppy and reinsert it to make sure that a tar df /dev/fd0 verifies the
data on the floppy, not what's in the cache.

Peter.