HACK: Borrow cephfs-debug for use in debugging cephfs-journal-tool
mds: Refactor CINode encoding into CInodeStore

CInode itself combined the on-disk format and
encode/decode logic with lots of other complex
behaviours.  This separates the simple parts
out so that they can be used by other tools that
are interested in looking at inodes outside of
a running MDS.

There is a small overhead because CInodeStore
can't decode a SnapRealm inline, so it keeps
a temporary copy of the encoded bufferlist.

Signed-off-by: John Spray <john.spray@inktank.com>
mds: Publicize some EMetaBlob members

This makes them accessible for JournalTool.  May want to revisit
this with friending or getters later.

Signed-off-by: John Spray <john.spray@inktank.com>
cephfs-journal-tool: start replay_offline
mds: Fix Dumper::undump (missing lock)
mds/journal-tool: Relocate Dumper & Resetter

Where previously they were hacked into the MDS service
executable, they are now available as commands in the
new journal tool.

Signed-off-by: John Spray <john.spray@inktank.com>
mds: Separate collection encoding from Journaler

Previously, the encoding of entries in a journal
and the communications to load and save the journal
byte stream were both done in Journaler.

This patch separates them, so that Journaler is responsible
primarily for I/O, while the encode/decode of the entries
is done in LogEventCollection.

Signed-off-by: John Spray <john.spray@inktank.com>
mds: add EMetaBlob::get_inodes

Used for filtering in journal tool

Signed-off-by: John Spray <john.spray@inktank.com>
journaltool: add filter by inode
mds: Add LogEvent::str_to_type

For CLI to resolve user input to a EVENT_* constant

Signed-off-by: John Spray <john.spray@inktank.com>
mds: switch __u32 with LogEvent::EventType typedef

Signed-off-by: John Spray <john.spray@inktank.com>
journaltool: add filtering by event type
mds: Add EMetaBlob::get_dentries

For tools that would like to know which dentries are
touched by a metablob, without understanding its
internal format.

Signed-off-by: John Spray <john.spray@inktank.com>
journaltool: filter by dirfrag

Signed-off-by: John Spray <john.spray@inktank.com>
fixup enoop
journaltool: add splice
mds: Add getter for EMetablob.client_name

Signed-off-by: John Spray <john.spray@inktank.com>
journaltool: filter by client