Problems with FS buffering on Linux 2.2.14

Reinhold Huber rhuber en fs.tum.de
Lun Ene 24 18:51:18 CST 2000


Hi all,

thank you very much for your good and quick answers. I had access to the
two Linux boxes today, so my answer is so late.

Details:


From: Manfred Spraul <manfreds en colorfullife.com>

> Reinhold Huber wrote:
> > 
> > So I assume that the Linux kernel keeps the read buffers for filesystems
> > even after the FS is unmounted, and re-uses them for the next mount of
> > the same FS. [...]
> Could you try if
> 
> 	# hdparm  -f -g /dev/sda
> 
> also flushes the buffers?
It didn't. The manpage concentrates a little bit on IDE, so it may
(or may not) be the reason that I use SCSI. I hope this info is of some
value for you.



From: Guest section DW <dwguest en win.tue.nl>

> From: Alan Cox <alan en lxorguk.ukuu.org.uk>
> >  
> > > Is there a kernel compiling option I missed which tells the kernel to
> > > remove the reading buffers after every umount, and if so, which one?
> > 
> > There isnt. There is however an ioctl for it. Have a look at man hdparm
> 
> These days (that is, since 2.10) util-linux comes with blockdev, a utility
> to do block-device iocts by hand.
> 
> # ./blockdev -?
> Usage: blockdev [-V] [-v|-q] commands devices
> Available commands:
> [...]
>         --flushbufs     (flush buffers)
>         --rereadpt      (reread partition table)
> #
> 
> Especially --flushbufs is often needed in scripts that
> manipulate loop devices or partition tables.
This was the solution. As util-linux 2.10 seems to be very fresh, I got the
source, compiled it and used only the blockdev binary. This one flushed
the right kernel buffers, and now, my problem is solved.

Again, thanks for the quick help.

Reinhold Huber

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo en vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



Más información sobre la lista de distribución Ayuda