Ted speaks again
Ted speaks again
Posted Mar 17, 2009 0:08 UTC (Tue) by jlokier (guest, #52227)In reply to: Ted speaks again by forthy
Parent article: Garrett: ext4, application expectations and power management
POSIX promises atomicy of operations like rename()
It promises atomicity of the directory modification done by rename, and every version of ext4 provides that. Renaming is equivalent to an atomic sequence of unlink() and link() calls.
You're confusing atomicity of the directory modification with serialising against the file content modification. POSIX doesn't promise anything about that in the absence of fsync() or fdatasync() used as a barrier between them. [I can't tell from the standard if fdatasync() is sufficient.]
