6 ms·
Has any other filesystem added in i-node arbitrary attribute tags? This would be invaluable for collections of documents, and would make most library managers l
by danmg 6y ago
Has any other filesystem added in i-node arbitrary attribute tags? This would be invaluable for collections of documents, and would make most library managers like calibre or tmm redundant.
- taviso 6y agoDon't all modern filesystems support extended attributes? (i.e. I don't understand what is so different between the BeOS addattr/catattr commands in the article and the standard Linux setfattr/getfattr commands)
- monocasa 6y agoThe addattr/catattr aren't where the fun is. That's in the indexing, allowing you to treat files with these attributes more like rows in a database. "Efficiently find me all files that have a 'genre' field set to 'bluegrass', regardless of extension" is something you can do for instance, at the filesystem level.
- taviso 6y agoSure, but the question was about whether any filesystems allow you to store the attributes. Storing and retrieving the attributes is the hard part that requires filesystem support, I think generating and searching the index pretty trivial once you have that. A quick index you can grep is a oneliner on Linux, something like getfattr -R /music -m genre > index.db
- monocasa 6y agoIs that updated atomically with filesystem updates? Can multiple applications access that simultaneously as it changes? Is it a known pattern where you expect the various applications on your system to be using that already?
- taviso 6y agoI'm not really sure what "atomically" means in this context, if you just mean you want the index updated when an attribute changes, then sure why not, just use inotify with IN_ATTRIB. I don't think anyone is currently using extended attributes like this, so there is no standard pattern. The question was about whether other filesystems can do this, and the answer is yes - basically all modern filesystems. I guess people have decided they don't think storing this metadata in the filesystem is best place (I don't know why, perhaps because it's complicated to copy the metadata when you email the files to someone else?).
- monocasa 6y ago> I'm not really sure what "atomically" means in this context, if you just mean you want the index updated when an attribute changes, then sure why not, just use inotify with IN_ATTRIB. The answer is it's not atomic, it's another system tacked on the side. The filesystem information and your index can and would get out of sync. You also can't safely access that from several programs simultaneously. > I don't think anyone is currently using extended attributes like this, so there is no standard pattern. They were under Be. > The question was about whether other filesystems can do this, and the answer is yes - basically all modern filesystems. No, no other filesytems I know will index off of attributes. Your example doesn't even index. It just writes everything to a file, and on updates has to rewrite the whole file, and searches have to iterate through the whole file. It does not do the same things the Be filesystem does, where the attributes get their own b-trees in the filesystem itself. The closest thing would be to load a database as a filesystem.
- taviso 6y ago> The answer is it's not atomic You'll have to explain it in more detail, if a file changes then the content has to be re-analyzed and the attribute updated to reflect that. > It does not do the same things the Be filesystem does, where the attributes get their own b-trees in the filesystem itself. Sure, but you can import them into a sqlite database, it's pretty simple.