mds: Add LogEvent::get_type_str()

Signed-off-by: John Spray <john.spray@inktank.com>
common: Add write_stream(ostream) to bufferlist

Enable C++ style file I/O when writing binary output
from bufferlists.

Signed-off-by: John Spray <john.spray@inktank.com>
mds: fix typo 'Sesion'
osdc: Add Sentinel and start_ptr fields to journal

TODO: backwards compat

Signed-off-by: John Spray <john.spray@inktank.com>
mds: Add get_paths method to EMetaBlob

May want to consider moving this into JournalTool as
it is just for debug.
mds: Create cephfs-journal-tool

Signed-off-by: John Spray <john.spray@inktank.com>
mds: Add ENoOp for padding journals

This allows us to implement journal splicing
without moving blocks around, and without modifying
the outer journal syntax.

Signed-off-by: John Spray <john.spray@inktank.com>
mds: Add get_metablob to LogEvent

Previously the only way to get at the payload
of things like EUpdate and EOpen was to replay() them
(required a full running MDS) or to use downcasting
(yuck).
implement filtering in JournalTool
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>