3 ms·
How does macOS guarantee no data loss when shutting down normally?
by apitman 2y ago
How does macOS guarantee no data loss when shutting down normally?
- int_19h 2y agoIf you need to guarantee that data is, in fact, written permanently, you use fnctl(F_FULLFSYNC). FWIW while fsync() on Linux does request that the drive flushes its hardware cache, it's up to the drive whether to actually honor this request, and many don't do so synchronously (but still report success). So unless you control the whole setup end-to-end - hardware and software both - you don't actually have the guarantees.
- apitman 2y agoThanks for the explanation