diff --git a/diskfs.go b/diskfs.go index f2e39cf2..3ab39ce5 100644 --- a/diskfs.go +++ b/diskfs.go @@ -158,8 +158,8 @@ func (m OpenModeOption) String() string { var openModeOptions = map[OpenModeOption]int{ ReadOnly: os.O_RDONLY, - ReadWriteExclusive: os.O_RDWR | os.O_EXCL, - ReadWrite: os.O_RDWR, + ReadWriteExclusive: os.O_RDWR | os.O_EXCL | os.O_SYNC, + ReadWrite: os.O_RDWR | os.O_SYNC, } // SectorSize represents the sector size to use