[Ocfs2-tools-devel] [PATCH 07/11] ocfs2-tools: add xattr support in debugfs.ocfs2
Tao Ma
tao.ma at oracle.com
Mon Mar 9 19:30:24 PDT 2009
Hi Tiger,
I just tried your newest debugfs.ocfs2 for xattr. Just some minor
comments. I tried "xattr -v" and here is the output.
debugfs: xattr -v 13750
Extended Attributes inline: 6
### Type Inline Name Length Value Length
#0 1 0 5 4095
Tree Depth: 0 Count: 1 Next Free Rec: 1
## Offset Clusters Block# Flags
0 0 1 97794 0x2
#1 1 1 5 5
#2 1 1 5 5
#3 1 1 5 5
#4 1 1 5 5
#5 1 1 5 5
Extended Attributes extent tree in index block #96771 Depth: 0 Records: 5
Tree Depth: 0 Count: 251 Next Free Rec: 5
## Offset Clusters Block# Flags
0 0 1 97808 0x0
1 1876914982 1 97887 0x0
2 1876915078 1 97856 0x0
3 1876915174 1 97835 0x0
4 2340354875 1 97810 0x0
Extended Attributes extent record start at #97810 Has clusters: 1 Has
buckets: 1
Extended Attributes in bucket #0: 55
### Type Inline Name Length Value Length
#0 1 1 6 6
<snip>
Here you use bucket iteration to list all the buckets. It is cool,
but... The iteration bucket is helpful when you want to iterate the
bucket while not caring much about the sequence. But here you see, you
list the tree in the reverse order. It isn't desirable since in all
other debugfs.ocfs2 case, we list the tree from the smallest one.
Extended Attributes extent record start at #97856 Has clusters: 1 Has
buckets: 1
Extended Attributes in bucket #0: 30
### Type Inline Name Length Value Length
#0 1 0 7 4095
Tree Depth: 0 Count: 1 Next Free Rec: 1
## Offset Clusters Block# Flags
0 0 1 97814 0x2
#1 1 0 7 4095
Tree Depth: 0 Count: 1 Next Free Rec: 1
## Offset Clusters Block# Flags
0 0 1 97813 0x2
#2 1 0 7 4095
Tree Depth: 0 Count: 1 Next Free Rec: 1
## Offset Clusters Block# Flags
0 0 1 97816 0x2
#3 1 0 7 4095
Tree Depth: 0 Count: 1 Next Free Rec: 1
## Offset Clusters Block# Flags
0 0 1 97815 0x2
#4 1 0 7 4095
Tree Depth: 0 Count: 1 Next Free Rec: 1
## Offset Clusters Block# Flags
0 0 1 97796 0x2
#5 1 0 7 4095
Tree Depth: 0 Count: 1 Next Free Rec: 1
## Offset Clusters Block# Flags
0 0 1 97795 0x2
#6 1 0 7 4095
Tree Depth: 0 Count: 1 Next Free Rec: 1
## Offset Clusters Block# Flags
0 0 1 97798 0x2
#7 1 0 7 4095
Tree Depth: 0 Count: 1 Next Free Rec: 1
I know the meaning, but I am not sure whether it is readable for a
normal user. Maybe here we just output the first line like
### Type Inline Name Length Value Length
#0 1 0 7 4095
#1 1 0 7 4095
#2 1 0 7 4095
#3 1 0 7 4095
#4 1 0 7 4095
...
And then a new command xattr <bucket_num or block num or even inode
number> <xe_num> can show the detail of the specified xattr?
Joel,
Are you comfortable with the original format, the new command I
suggest? Or you have your own thought for it?
Regards,
Tao
More information about the Ocfs2-tools-devel
mailing list