Subject: Re: File system performance on i386
To: Christoph Hellwig <chhellwig@gmx.net>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: tech-perform
Date: 02/26/2001 21:53:53
On Sun, Feb 25, 2001 at 05:35:30PM +0100, Christoph Hellwig wrote:
> On Fri, Feb 23, 2001 at 07:18:03PM +0000, David Brownlee wrote:
> > 
> > 	For important data the program has the option of using fsync(),
> > 	IIRC this doesn't do anything on ext2fs under linux, which was
> > 	an unpleasant surprise.
> 
> Look at the source - the ext2 fsync traverses a double linked list of dirty
> buffers, schedules an IO on them and wait until it is finished - exactly
> what fsync() should do.

Does it flushes all buffer, or only buffers associed with the file descriptor ?
In the second case, some metadata of the directory path (as there's no
ordered writes) may not be flushed and your file ends in lost+found in case of
unclean shutdown.

--
Manuel Bouyer <bouyer@antioche.eu.org>
--