Does Linux sync(2) wait?

From: Frank Cusack
Date: Sun Mar 21 2004 - 05:32:51 EST


Looking at 2.4 and 2.6 sources, Linux does appear to wait before returning.
I'm especially interested if NFS data is sent to the server. (I want to
be able to take a stable snapshot of a netapp volume.)

But on my RHL 9 system, I have 3 different man pages and an info page,
all of which say something different.

sync(2) says:

According to the standard specification (e.g., SVID), sync() schedules
the writes, but may return before the actual writing is done. However,
since version 1.3.20 Linux does actually wait.

sync(8) says:

On Linux, sync is only guaranteed to schedule the dirty blocks for
writing; it can actually take a short time before all the blocks are
finally written.

sync(1) is in the middle and doesn't really say anything, it refers to
the info page which also isn't specific.

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