Use O_DSYNC instead of O_SYNC when opening a file with mode="rwd".

It distinguishes O_DSYNC and O_SYNC since Linux 2.6.33 which gives
more options to user space applications. The perfomance
RandomAccessFile will get benefit from this. And it makes the
implementation of "rwd" complied with the spec.

Change-Id: Ic8bf88cf449ba46abe21a44abf50d0bbc62e4bb0
Signed-off-by: Philippe Longepe <>
Signed-off-by: zhongjie <>
3 files changed