Skip to content

Commit

Permalink
Open disk in O_SYNC mode when writing
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidVentura committed Nov 6, 2023
1 parent 5817922 commit c110ce4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions diskfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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_DIRECT,
ReadWrite: os.O_RDWR | os.O_DIRECT,
}

// SectorSize represents the sector size to use
Expand Down

0 comments on commit c110ce4

Please sign in to comment.