[EMAIL PROTECTED] <[EMAIL PROTECTED]> writes on 3 February 2000 at 22:49:15 -0600
>
> On Thu, 3 Feb 2000 23:15:41 -0500 (EST) , Russell Nelson writes:
> > [EMAIL PROTECTED] writes:
> > > What use is syncing the data to disk, if you can't
> > > get to it after a crash? It might as well have just
> > > stayed in cache otherwise....
> >
> > fsync the data if you want the data on disk.
> > fsync the directory if you want the metadata on disk.
> >
> > What's complicated or difficult about that?
>
> It's not difficult -- just overly complicated, compared
> to the standard
>
> - fsync the file if you want the file on disk
>
> Why require two separate fsync() calls when one
> will do?
>
> Further, what is the point if the first fsync() call
> is useless without the second, and vice versa?
>
> (If the data is on disk, but the on-disk metadata is
> not sufficient to locate it, then the data is, for
> all practical purpose, useless.)
True; but if you're modifying existing files, the directory data to
locate it is already safely on disk; only the timestamp might be
wrong. This isn't the qmail situation, but it's an important real
situation, and suggests a reason why it makes sense to to separate
file sync and directory sync. Maybe.
--
Photos: http://dd-b.lighthunters.net/ Minicon: http://www.mnstf.org/minicon
Bookworms: http://ouroboros.demesne.com/ SF: http://www.dd-b.net/dd-b
David Dyer-Bennet / Welcome to the future! / [EMAIL PROTECTED]