View Single Post
  #1   (View Single Post)  
Old 3rd December 2015
rons's Avatar
rons rons is offline
Snoozing
 
Join Date: Oct 2015
Posts: 69
Default extended attributes

I'm setting up the extended attributes like this:

Code:
# Initialize the extended attrib backend: (only done once).
mkdir -p /.attribute/user
mkdir -p ./attribute/system
cd /.attribute/user
extattrctl initattr -p / 4096 ./extattrstore
extattrctl start /
Code:
#Then, I enable the "author" extended attribute
extattrctl enable / user author /.attribute/user/extattrstore
Code:
#Then I set and retrieve the author attribute for the file joes-stuff.txt:
# Set
setextattr user author "Joe Jimmy" /home/jake/joes-stuff.txt
# Get
getextattr -x user author /home/jake/joes-stuff.txt
This seems to work great! I can build a little script to make this a snap. A couple things I wonder about. The initattr step seems to go into a recursive store build (eventually getting to 50G of null bytes) before I killed it. The only non-null bytes were the first few:

Code:
d5ec 00b5 0003 0000 1000 0000 0000 0000 and then 0000 -> up to 50G
So, the initialization adds very little to the store. Everything worked OK (seemingly) with the huge mostly empty store backing. I wonder if I should report this as a bug? Or am I doing something stupid to make it build recursively? The extended attributes seem to work great (based on the small amount of time spent playing with it), even with 50G of null bytes at the end of the store file. Anybody else use this stuff?

Last edited by rons; 3rd December 2015 at 07:17 PM.
Reply With Quote