Messages in this thread | | | Date | Sat, 15 Jan 2000 23:28:22 -0500 (EST) | From | Alexander Viro <> | Subject | Re: [Patch] Cleanup struct gendisk registration, 2.3.40-pre1 |
| |
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.
Notice that if we actually _did_ something with /dev/foo we would get a invalidate_buffers() upon closing it. However, even that is not guaranteed if we only used a partition - it will get invalidate_buffers(), but partition tables will not.
Options: short-term one - do invalidation in cleanup_module() (some drivers do, some don't); possibly better variant - don't bother with buffer cache in partition parsing. For now I'ld go for the former - implementing the latter will not change interface, so it can be done more or less at leisure... Comments? Cheers, Al
- 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/
| |