Re: Castlewood EIDE *removable* disk vs 2.2.5

Guest section DW (dwguest@win.tue.nl)
Tue, 28 Sep 1999 01:26:38 +0200 (MET DST)


From: Perry Wagle <wagle@cse.ogi.edu>

If I mount a castlewood EIDE *removable* disk in Redhat's 2.2.5-22
kernel, then I'm stuck "forever" with the inode vector for that disk,
even if I unmount it, eject it, and replace it with other media, even
media *without* partition tables. In fact, the disk can be mounted
(read-only) and recursively "du"'d without it even spinning up (after
a weekend of being unmounted). If I then "cat" a file, then the disk
spins up, and I get garbage.

It seems to me that either the inodes aren't being deleted on the
unmount, or maybe the disk drive itself is caching the information
(and not letting go).

I did various web and dejanews searches, and no-one's reported this
problem as far as I can tell.

Hmm. Something very similar came up just a few days ago.
It was a case where someone gave an eject command to a
SCSI disk and the kernel never noticed that the disk was gone,
so the next disk that was inserted got the blocks and inodes
from the previous one.

In that case the reason was that this old SCSI-1 disk was not
recognized as being removable.
Here for IDE disks drive->removable is set if (id->config & (1<<7)),
that is, if the identify command reports the disk as being removable.
You may test using hdparm -i what the disk reported.

In case it says
Config={ Fixed }
then we understand what went wrong. You can write the two-ioctl
program that does BLKFLSBUF and possibly BLKRRPART to make sure
the cache is flushed.

Andries

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/