For those of you wondering, I’m still working on union mounts, just heads-down on a major rewrite to fix the hairiest problems. Right now I’m perhaps 90% of the way through rewriting the actual lookup code, the dense nutty core of union mounts. This will fix one of the most difficult problems with the current code, massive code duplication between cached, real, and restricted real (“hash”) lookups:
I rewrote this to be one function with a loop centered around __lookup_hash() and it’s looking pretty good.
This rewrite is one of the hardest coding problems I’ve ever worked on, and I have a lot of respect for the original union mount authors, Jan Blunck, Bharata Rao, Miklos Szeredi, David Woodhouse, and everyone else who has ever worked on a unioning file system. Not to mention the regular VFS authors – the cost of pathname lookup is one of the most crucial elements of operating system performance and it takes a lot of work to make it go fast.