News for hackers. Stuff that matters.
Re:POSIX v. reality: A position on O_PONIES by hedora on Thursday November 23, 2023 @11:53PM (#38400746)
That’s not quite true. There used to be a performance bug in ext3 that caused it to order the writes before the journal flush that created the files.

Then, gnome(?) and only gnome(?) relied on it, leading to massive filesystem corruption, so the kernel team gave up and made the old braindead behavior the default.

(The current default behavior is braindead because it makes rename extremely slow for correct programs that don’t care about durability across crashes, and therefore don’t call fsync).

Re:POSIX v. reality: A position on O_PONIES by throwaway09223 on Friday November 24, 2023 @12:19AM (#38400852)
Yeah, all filesystems are allowed to synchronize to disk as often as they want, in whatever way they want in /addition/ to what's specified. Filesystems can even make their own guarantees, above and beyond generalized specifications like fsync().

I could write a filesystem that synchronized files after every 42 megabytes, or once every 69 seconds. Apps might even come to depend on this behavior. All filesystems will have predictable, implementation dependent idiosyncrasies.

But these aren't specified behaviors. They're not part of an interface and they shouldn't be depended on. The article implying that they ought to be is, I think, shortsighted. Other filesystems don't do this and your code will break if you assume it.

I agree it's braindead.