Re:Deprecating the PCOMMIT Instruction
by koverstreet on Thursday September 15, 2016 @06:44AM
(#12504835)
It's a lie that you don't need fsync with O_DIRECT - writes could still be in the hard drive's write buffer, or the filesystem could have metadata updates that haven't been written yet (e.g. unwritten extents that need to be marked as written).
Not exactly, you still need a cache flush if you want to ensure that your write is persistent.
Its analogous to fysnc() to ensure data reaches the disk in a way that survives power failure. This is like just treating all writes as fsynced and not needing to worry about fsync at all, like with O_DIRECT writes.