|
|
|
|
|
by jlokier
1489 days ago
|
|
O_DIRECT doesn't provide power-cut durability on storage devices with write cache. Recently written and acknowledged data can still be lost on a power cut. You still need fsync, fdatasync or equivalent after an O_DIRECT write, to tell the storage device to commit its write cache to the non-volatile layer. (And last time I looked, I think some filesystems even incorrectly failed to flush the device write cache on fsync after O_DIRECT writes because of no dirty page states.) |
|