add options to set O_SYNC, O_DSYNC or O_DIRECT open flags.