Substitute O_DSYNC with O_SYNC or O_FSYNC when needed.