Re: ext3-2.4-0.9.4

From: Lawrence Greenfield (leg+@andrew.cmu.edu)
Date: Mon Jul 30 2001 - 12:11:32 EST


   From: "Patrick J. LoPresti" <patl@cag.lcs.mit.edu>
   Date: 30 Jul 2001 12:46:13 -0400

> Besides BSD softupdates and the various journaling
> filesystems which are in use on other Unixen also
> don't provide the 4.3BSD solution any more ...

   This surprises me if it is true; do you have a reference? And what
   mechanism *do* the modern BSDs provide to commit metadata changes to
   disk?

BSD softupdates allows you to call fsync() on the file, and this will
sync the directories all the way up to the root if necessary.

Thus BSD fsync() actually guarantees that when it returns, the file
(and all of it's filenames) will survive a reboot.

Sendmail does:
fd = open(tmp)
write(fd)
fsync(fd)
rename(tmp, final)
fsync(fd)

Cyrus IMAP does:
fd = open(tmp)
write(fd)
fsync(fd)
link(tmp, final1)
link(tmp, final2)
link(tmp, final3)
fsync(fd)
close(fd)
unlink(tmp)

The idea that Linux fsync() doesn't actually make the file survive
reboots is pretty ridiculous.

Larry

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



This archive was generated by hypermail 2b29 : Tue Jul 31 2001 - 21:00:44 EST