On Fri, Apr 25, 2025 at 08:40:48PM -0700, Linus Torvalds wrote: > On Fri, 25 Apr 2025 at 20:09, Kent Overstreet <kent.overstr...@linux.dev> > wrote: > > > > The subject is CI lookups, and I'll eat my shoe if you wrote that. > > Start chomping. That nasty code with d_compare and d_hash goes way back. > > From a quick look, it's from '97, and got merged in in 2.1.50. It was > added (obviously) for FAT. Back then, that was the only case that > wanted it. > > I don't have any archives from that time, and I'm sure others were > involved, but that whole init_name_hash / partial_name_hash / > end_name_hash pattern in 2.1.50 looks like code I remember. So I was > at least part of it. > > The design, if you haven't figured it out yet, is that filesystems > that have case-independent name comparisons can do their own hash > functions and their own name comparison functions, exactly so that one > dentry can match multiple different strings (and different strings can > hash to the same bucket). > > If you get dentry aliases, you may be doing something wrong.
Yeah, Al just pointed me at generic_set_sb_d_ops(). Which is a perverse way to hide an ops struct. Bloody hell...