4 ms·
Yes, acknowledged. https://news.ycombinator.com/item?id=19128325 https://news.ycombinator.com/item?id=19128325 fsync() is not documented to be system-wide (wh
by hyc_symas 8y ago
Yes, acknowledged.
https://news.ycombinator.com/item?id=19128325 https://news.ycombinator.com/item?id=19128325
fsync() is not documented to be system-wide (while sync() is). That behavior would also be an OS bug. The question this person asked was specifically about fsync().
- jorangreef 8y agoSorry, that was confusing, I meant "system-wide" as in file system, not OS, i.e. "if you share a physical disk device with any other process". When you flush a particular FD, some file systems just flush every dirty buffer for the entire disk. I wouldn't actually be surprised though if there are some kernels that flush all disks either, regardless of whether it's considered a bug or not. "The question this person asked was specifically about fsync()." Sure, but as you acknowledged elsewhere, if sync is called, it flushes everything, and this impacts upon the person who "asked specifically about fsync" since there's a chance on some kernels that sync will eat the error that fsync was expecting.