Messages in this thread | | | Date | Sun, 16 Jan 2000 15:04:00 +0100 | From | Guest section DW <> | Subject | Re: [Patch] Cleanup struct gendisk registration, 2.3.40-pre1 |
| |
On Sat, Jan 15, 2000 at 11:28:22PM -0500, Alexander Viro wrote: > > Folks, looks like we have a funny failure mode: we invalidate buffers only > upon close(), right? Well, going through the partition table happens > without open(). So consider the following scenario: > we insmod the driver foo. > it reads partition table for /dev/foo, doing it via bread() and > populating the page cache. > we rmmod it. > change the disk. > insmod again. > oops, we got stale buffer_heads.
I was going to answer that we do bforget() everywhere so that the problem does not arise. But checking I find a handful of brelse()'s as well. Probably you should change these to bforget().
Other than that, I do not think your problem occurs.
On the other hand, a problem that does occur is the aliasing between block 15003 of hda and block 3 of hda2. It is a misdesign of the buffer cache. [Wait until 2.5 before repairing.] The current state of affairs causes strange things around fdisk and various partition repair programs.
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/
| |