Petri Kaukasoina writes:
> On Wed, Jun 23, 1999 at 08:04:53AM +0200, Peter van der Landen wrote:
> > The Cyrus documentation suggests using chattr -R +S on the queue directories
> > as well as the mailboxes. Would that be less effective than using a
> > sync-mounted filesystem?
>
> Dan fsyncs explicitely all the _files_ when needed, so there's no problem
> with them. But in Linux the metadata, e.g. the directory entries are not
> written synchronously by default. Suppose qmail receives a mail message,
> writes it to the queue, fsyncs it and reports mail received. In case of
> power failure at this point the file was written ok but its directory entry
> was not on disk yet. After bootup fsck puts the message to /lost+found
> where you can find it but it is not in the qmail queue.
>
> The solution that Linus proposed was to fsync the _directory_ too in
> addition to the _file_ and that is what my shared library does. Actually it
> fsyncs the directories every time when link, unlink, open and rename system
> calls are used (they update directory entries), needed or not.
Right. That's because it's a stupid idea to fsync metadata. A
directory is just another file -- why should it automatically be
fsynced just because a different file got fsynced? You want your
directories written to disk, you fsync them.
No, I don't worship Karels, et al. The Berkeley CSRG made some
mistakes. Instead of perpetuating these mistakes, as if they were
physical properties handed to us by God (186K miles/sec -- not just a
good idea, it's the law), Linus is trying to fix them. Yes, it's
another "gratuitious" incompatibility, but it has serious efficiency
ramifications.
Just like Dan is introducing "gratuitious" incompatibilities. :)
Only difference is that, unlike vendor gratuitious incompatibilities,
I *like* Dan's incompatibilities. I wish Dan had the time to put
together a Linux distribution.
--
-russ nelson <[EMAIL PROTECTED]> http://crynwr.com/~nelson
Crynwr supports Open Source(tm) Software| PGPok | Government schools are so
521 Pleasant Valley Rd. | +1 315 268 1925 voice | bad that any rank amateur
Potsdam, NY 13676-3213 | +1 315 268 9201 FAX | can outdo them. Homeschool!