MDS: CInode: add a fetch_backtrace() utility function

Expose MDCache::fetch_backtrace and call it from the CInode context.

Signed-off-by: Greg Farnum <greg@inktank.com>
MDS: add operator==() and compare() for inode_backtrace_t

The compare() function checks one backtrace against another and indicates
if they're equivalent (or divergent!) and the relative freshness.

Signed-off-by: Greg Farnum <greg@inktank.com>
MDS: MDRequestImpl: provide filepath/filepath2 substitute for MClientRequest

Use this passthru in the Server path locking functions so that we can get
locks or auth pins without an associated MClientRequest.

Signed-off-by: Greg Farnum <greg@inktank.com>
WIP MDS: CInode: CDir: create a flush() function

TODO: these still aren't safe; accounted_rstats isn't handled.
Maybe other things too?
Actually I think that's a lie and this is fine, check...

Signed-off-by: Greg Farnum <greg@inktank.com>
Continuation: Add a new Continuation class.

TODO: documentation on how to actually use it. Add it to the Makefile.

Signed-off-by: Greg Farnum <greg@inktank.com>
Continuation: add parallel mode

Signed-off-by: Greg Farnum <greg@inktank.com>
MDS: CInode::validate_disk_state()

Add a function that will validate the on-disk state of the CInode. We currently
check that the on-disk backtrace matches (or is older) and compare rstats on
dirfrags against the parent dir's inode (for directories only).

TODO: We still don't validate the actual on-disk Inode
object against what we already had in memory, though.
TODO: validate that the on-disk Inode object matches what the parent
directory holds.

It's using a sort-of new programming model, trying to stuff stack data into
a Continuation object and write everything sequentially instead of having
a function and Context per IO.

Signed-off-by: Greg Farnum <greg@inktank.com>
MDS: CInode: implement dump_validation_results()

Signed-off-by: Greg Farnum <greg@inktank.com>
MDCache: add a scrub_dentry() function, and wire it up to the admin socket

scrub_dentry() is passed a string path, and it validates it before replying. We
hook up an admin socket command "scrub_path" to call it and dump the output.

Signed-off-by: Greg Farnum <greg@inktank.com>
FIXUP "MDS: CInode::validate_disk_state()"
SQUASH "MDCache: add a scrub_dentry() function, and wire it up to the admin socket"

Add MDRequest persistence and cleanup, so we actually hold our locks...d'oh!

Signed-off-by: Greg Farnum <greg@inktank.com>