Walt Mankowski on 2 Dec 2004 05:42:03 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Slides for qmail talk


On Wed, Dec 01, 2004 at 10:19:19PM -0500, Mark Dominus wrote:
> Thanks for having me at your meeting to talk this evening.

Thanks, Mark,

I wanted to followup on the point about fsync(2) I made during your
talk tonight.  Here's what the manpage for fsync says on BSD[1]:

  Fsync() causes all modified data and attributes of fd to be moved to
  a permanent storage device.  This normally results in all in-core
  modified copies of buffers for the associated file to be written to
  a disk.

And here's the corresponding manpage on Linux:

  fsync copies all in-core parts of a file to disk, and waits until
  the device reports that all parts are on stable storage.  It also
  updates metadata stat information. It does not necessarily ensure
  that the entry in the directory containing the file has also reached
  disk.  For that an explicit fsync on the file descriptor of the
  directory is also needed.

Qmail assumes that fsync(2) works the BSD way.  There are patches to
qmail to have it work that way on Linux.

Walt

1. I checked OpenBSD and OSX and it says the same thing on both
   platforms.

Attachment: signature.asc
Description: Digital signature