Messages in this thread | | | Date | Sat, 15 Jan 2000 11:32:59 +0100 (MET) | From | Mikael Pettersson <> | Subject | why invalidate_buffers() in blkdev_put()? |
| |
In 2.3.39 a call to invalidate_buffers() was added to fs/block_dev.c:blkdev_put().
Is it really necessary to forcibly throw away in-core cached data just because the device was closed?
The device is synced, so the cache is simply reclaimed if/when that memory is needed later on, and check_media_change() is there to invalidate the cache if the media has changed the next time the device is opened.
The effect is quite visible when a slow removable device, say a floppy, is accessed multiple times. E.g.
# tar tvf /dev/fd0 reads from media # tar xvf /dev/fd0 kernels < 2.3.39 read from in-core cache, 2.3.39 reads from media _again_
/Mikael
- 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/
| |