On Sat, 15 Jan 2000, 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
There's no point in calling invalidate buffers on close in first place.
>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.
A good driver won't have any problem. A good driver should call
check_disk_change() as first thing on each open/read/write/partition-table
read.
>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?
destroy_buffers in cleanup_module should be called anyway.
Andrea
-
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/
This archive was generated by hypermail 2b29 : Sun Jan 23 2000 - 21:00:14 EST