Messages in this thread | | | Date | Fri, 28 Aug 2009 17:50:49 +0100 | From | Jamie Lokier <> | Subject | Re: adding proper O_SYNC/O_DSYNC, was Re: O_DIRECT and barriers |
| |
Jamie Lokier wrote: > That's because this thread is the first time I've heard that Linux > O_SYNC was really the weaker O_DSYNC in disguise, and judging from the > many Googlings I've done about O_SYNC in applications and on different > OS, it'll be news to other people too. > > (I always thought the "#define O_DSYNC O_SYNC" was because Linux > didn't implement the weaker O_DSYNC).
It looks like we're not the only ones. AIX has:
http://publib.boulder.ibm.com/infocenter/systems/index.jsp?topic=/com.ibm.aix.genprogc/doc/genprogc/fileio.htm
Before the O_DSYNC open mode existed, AIX applied O_DSYNC semantics to O_SYNC. For binary compatibility reasons, this behavior still exists. If true O_SYNC behavior is required, then both O_DSYNC and O_SYNC open flags must be specified. Exporting the XPG_SUS_ENV=ON environment variable also enables true O_SYNC behavior.
-- Jamie
| |