mds: Add LogEvent::get_type_str()

Signed-off-by: John Spray <john.spray@inktank.com>
mds: Fix remotebit::dump for less common types

This was hitting an assertion when used on anything
other than a regular/symlink/dir.  Now covers
all types.

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'
tools/rados: Allow binary file output of omap data

Extends getomapval and getompaheader to take an output
file argument the same way 'get' does.  Removes misleading
'-o' line from usage(), there doesn't appear to be any
such
option.

Signed-off-by: John Spray <john.spray@inktank.com>
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