From: "Arthur A. Gleckler" <xxxxxx@speechcode.com>
Date: Wednesday, July 10, 2019 5:51 PM
1) Be content with the 30-second auto-sync like everyone else.
It's not clear to me that the 30-second auto-sync is reliable, either. I can't find it right now, but I read an ACM paper a few years ago that compared several filesystems and showed that they had widely varying behavior with respect to unplanned shutdown. Varying the hardware makes reliable behavior even less likely. I don't think waiting thirty seconds will fix that.
It's an Original Sin of UNIX, probably from before the
RK05 became the canonical disk drive for it. Looking it up, it had 203 tracks and an average 70 millisecond seek time, there was a big performance premium in using the elevator algorithm.
Like in those bad old days, the big issue with unplanned shutdowns is that data isn't likely written in the order you expect, even before we get into issues about how SSDs emulate hard disks, and how for a very long time if not still today disks and SSDs present 0-last block interfaces, but the UNIX family demands to know the number of sectors per track, cylinders, and surfaces.... And with those 0-last block interfaces, a hard disk itself will be doing elevator writes.
SSDs ... let's not go into the details of making flash reliable right now.... And then there's all the help parts of a system stack you might use, like software RAID and a Logical Volume Manager.
As I alluded to in my first comment, the trick is to do things so that you can pick up the pieces after an unplanned shutdown. And if you're not using checksums, in your filesystem or at a higher level, get out of here!
- Harold