Walt Mankowski on 2 Dec 2004 20:44:02 -0000


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

Re: [PLUG] Slides for qmail talk


On Thu, Dec 02, 2004 at 10:03:34AM -0500, Mark Dominus wrote:
> I think the source of confusion here is that the fsync problem we were
> discussing may be for a different version of linux than the one that
> the manual you quoted pertains to.

<clip>

>         3. Eventually, sanity prevailed in the Linux world.  The old,
>            buggy fsync() call was renamed to fdatasync(), and fsync()
>            itself was replaced with a correctly-working version.

Hmm, I didn't notice the documentation for fdatasync(1), which is on
the same manpage for fsync(1) on my Linux box.  It says:

  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.

  fdatasync does the same as fsync but only flushes user data, not the
  meta data like the mtime or atime.

What's the difference between "metadata stat information" (which is
flushed) and "the entry in the directory containing the file" (which
isn't)?

Walt

Attachment: signature.asc
Description: Digital signature