Open disk in O_SYNC mode when writing#188
Conversation
|
Wouldn't that make it terribly slow? It would force all writes not to return until the OS finished flushing to disk, as opposed to the usual disk behaviour. If it is to address just the partition case, would a flush right after this Write() do it? And does the failure happen in that same function, say here? |
|
The behavior I am seeing is that a For me, it is indeed only for the partitioning use-case, which ends up writing very little so this sync behavior is not noticeable. I'll try to reproduce with a |
|
This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
I've had some intermittent issues with some NVMe disks ignoring the partitions I was writing with
diskfs.Partitionand immediately reading them back.No amount of
syscalls.Syncwould make the issues go away, but changing the writing mode toO_SYNCdid help.