Comment by asdfasgasdgasdg
7 years ago
Presumably people will not buy permanent storage that does not commit data that is transferred to it? The thing is, the fsync guarantee isn't useless. You "just" have to rewrite any data that you had previously written since the last sync, and be tolerant of partially committed data in the interim.
What if the hardware has its own notion of sync. I am not familiar with disk IO protocols, but I assume they are permitted to store writes in an internal buffer. In such a case, I would expect fsync to issue a sync request to the device and wait until the device reports that the sync is finished. Admittedly, the phrasing of the spec is not 100% clear on this point; but I think the correct reading of it is that the correct behavior is to wait until the device actually commits the data (or at least claims to; at some point broken/lieing hardware is just broken).
Your assumption is correct.