2 ms·
PC drives have had write caches and the necessary barrier/flush commands for many years. This is nothing new or dangerous. Additionally operating systems also
by the8472 7y ago
PC drives have had write caches and the necessary barrier/flush commands for many years. This is nothing new or dangerous.
Additionally operating systems also play exactly the same "dangerous" game with writes, they keep dirty pages in memory and flush them out gradually. You are only guaranteed that things actually got to disk when you fsync them which sets off a cascade of writes and flushes if they didn't already happen in the background.
Write performance is largely a very well-maintained illusion if you don't have something like Optane. If you open files in SYNC mode write performance craters, even on NVMe.
What filesystems do to maintain sanity among this madness is to order writes so that if a crash occurs you lose a few seconds of data, but you don't lose consistency, you just get an older state of whatever made it to disk.
SD cards are not special in this regard.