expose directory subtree partition/replication/fragmentation via ceph.* xattrs
#1 Updated by Sage Weil almost 11 years ago
Exposing some of the internal state will make aid in debugging. xattr.c already has a bunch of machinery for setting up virtual xattrs. Maybe start with something along these lines:
On files and dirs:
ceph.caps: 1 or more lines like
mdsid "auth"|"rep" capid# seq# issued revoking
For the issued/revoking strings, see ceph_cap_string() helper, although we probably want to create a version that takes an explicit buffer and avoids the hackery in the regular version. The auth/rep bit is determined by comparing cap == ci->i_auth_cap.
There is some other cap metadata we could expose (dirty and flushing bits, flush_tid) but those may belong in another xattr.
ceph.dirfrags: enumerate dirfrag tree, one per line, with whatever info we have in (see struct ceph_inode_frag)