3 ms·
> "file systems need to have a flexible metadata mechanism instead of ad-hoc hacks" xattr's require a system call for each path you want to look up, and then
by akira2501 4y ago
> "file systems need to have a flexible metadata mechanism instead of ad-hoc hacks"
xattr's require a system call for each path you want to look up, and then another system call for each value you actually want to retrieve. Plus all the error handling that goes along with those calls. Oh, and they're all strings, so even more work if you want to have an integer attribute. Also, which quota should the space used by the attributes accrue to? Should we split that into "user" and "system" attributes? Whoops, looks like we need an "ad-hoc" namespace here too... this time with actual security implications!
The mechanism exists, but it's more cumbersome than it's worth. That's certainly the way I've felt about it every time I have to muck around with a system that "mistakenly" decided to use them instead of just a database.
In that light, the dot is not a historical mistake. It's an obvious optimization of a particularly popular use case.