osdc/Journaler: remove unused waitfor_trim

There was no code path for ever adding contexts to this list.

Signed-off-by: John Spray <john.spray@redhat.com>
osdc/Journaler: use finisher for public callbacks

This is needed because of occasional lock cycles with
external callers doing e.g. write_head.

We do get some weird-looking multiply-nested
C_OnFinisher(C_OnFinisher(...)) from this approach,
where one finisher exists to protect journaler from
lock cycles wrt objecter, and the other exists
to protect the MDS from lock cycles wrt journaler.

Signed-off-by: John Spray <john.spray@redhat.com>
mds: convert IO contexts

As of this change, the only thing in the MDS inheriting
directly from Context is MDSContext.

The only files touching mds_lock explicitly are MDS, MDLog and
MDSContext -- everyone else should be getting their locking behaviour
via the contexts.  (one minor exception made for an assertion in
Locker).

Signed-off-by: John Spray <john.spray@redhat.com>
fixup io context
fixup journaler to handle null ctx
osdc/Journaler: fix C_RetryRead locking

Not sure this was ever actually getting used, but
it would have had a problem if it was.

Signed-off-by: John Spray <john.spray@redhat.com>
mds/Server: fix wait_for_osd_map calls

These needed a C_OnFinisher and C_IO_Wrapper because they
are called back from the Objecter like an I/O completion.

Signed-off-by: John Spray <john.spray@redhat.com>