Re: Corruption caused by umount not flushing the buffer cache.

From: Guest section DW (dwguest@win.tue.nl)
Date: Tue Jan 25 2000 - 11:11:24 EST


On Tue, Jan 25, 2000 at 02:52:14PM +0000, Alan Cox wrote:

> > You cannot make changes in the behavior of a Linux, that divorce it
> > completely from the Historical behavior of Unix.
>
> I can't find anything in the posix or SuS about this. In fact I can't find
> anything in the V7 manual about it either.
>
> Its quite valid for non-removable media to keep the data cached

Yes.

(Although we have seen two examples of people that had their disks
connected to two CPUs, and needed an explicit flush.)

However, maybe you'll be disappointed with 2.3.37 or later.
These days umount_dev() calls blkdev_put(), which again
calls invalidate_buffers().

So, if /dev/hdb1 is mounted, or otherwise in use, then
blocks from hdb1 remain cached and operations on the raw device
are fast, as they used to be. But once /dev/hdb1 is unmounted
operations on the raw device become slow, each read has to
read all blocks from disk again.

-
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 : Mon Jan 31 2000 - 21:00:15 EST