> 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.