mds: Allow pin refs on inode to be real ref counts

Implement pin refs on the inode as a map instead of
a multiset, allowing individual ref counts to act as
real references with values that can be >1.

The pin refs are only used for debugging, but allowing
them to be >1 avoids the need for a separate state field
things like DIRTYPARENT.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
mds:  Add backtrace on file create, rename, mkdir

Add a backtrace to the data pool for a file, or the
metadata pool for a directory, as the 'parent' xattr
on the object (named by inode) in that pool.  The
backtrace is written after the journal is committed
and the safe reply is returned to the client.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
mds:  Use new pin ref code for DIRTYPARENT

Allow incrementing/decrementing the DIRTYPARENT pin ref as needed,
instead of using a state semaphore to keep track of whether its
set or not.  This allows us to remove the STATE_DIRTYPARENT field
on CInode.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Add encode/decode for old_pool/update_bt on EMetaBlob

Signed-off-by: Sam Lang <sam.lang@inktank.com>
dencoder:  Add inode_backtrace_t to types

Signed-off-by: Sam Lang <sam.lang@inktank.com>
mds: Cleanup new segment conditionals

The second conditional here was always true when
the first conditional was true.  Clean this up a
bit to simply create a new segment when either we've
reached the end of the current segment, or no current
segments exist.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
pybind/cephfs:  Add initial py wrappers for cephfs.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
test/mds:  Add test to check backtraces

Signed-off-by: Sam Lang <sam.lang@inktank.com>
mds: Add kill points for backtrace testing

Signed-off-by: Sam Lang <sam.lang@inktank.com>