Re:New Mac Mini with M4
by int_19h on Tuesday October 29, 2024 @02:40PM
(#41987933)
If 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.
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.