On Wed, 17 Jan 2024 at 18:06, Theodore Ts'o <tytso@xxxxxxx> wrote: > > A file system which supports casefolding can support "strict" mode .. and we can support "shit" mode that craps all over your filesystem too. The fact that you can support something doesn't make it good. > This is what MacOS does, by the way. The MacOS filesystem is the CVS of filesystems: if you see that it does something, the right thing is almost certainly to do the exact opposite. Case-folding is a horrible thing to do in the first place, but MacOS compounds on its bad ways by then using NFD normalization, AND EXPOSING THAT TO THE USER. IOW, MacOS actively changes and corrupts the data the user gave it for filenames. There are tons of Apple apologists out there that will make any number of excuses for it, but it's actively shit. It's broken garbage. So the fact that MacOS then has "strict" mode, really is an argument *against* it. The MacOS filesystem designers were fed the wrong kind of drugs, and I suspect they may not have been the brightest bunch to begin with. > So we don't need to worry about the user not being able to fix it, > because they won't have been able to create the file in the first > place. Yeah, that's a fine argument, until you have a bug or subtle bit flip data corruption, and now instead of having something you can recover, the system actively says "Nope". > I admit that when I discovered that MacOS errored out on illegal utf-8 > characters it was mildly annoying, We may have to be able to interoperate with shit, but let's call it what it is. Nobody pretends FAT is a great filesystem that made great design decisions. That doesn't mean that we can't interoperate with it just fine. But we don't need to take those idiotic and bad design decisions to heart, and we don't need to hide the fact that they are horrendous design mistakes. So "strict" mode should mean that you can't *create* a misformed UTF-8 filename. It's that same "be conservative in what you do". But *dammit*, if "strict" mode means that you can't even read other peoples mistakes because your "->lookup()" function refuses to even look at it, then "strict" mode is GARBAGE. That's the "be liberal in what you accept" part. Do it, or be damned. Really. No excuses for shit modes. Linus