osdc: locking for Journaler

also remove the lock pointers that JournalPointer load/save
used to require in order to use the objecter.

Signed-off-by: John Spray <john.spray@redhat.com>
mds: use finisher for BootStart contexts

Signed-off-by: John Spray <john.spray@redhat.com>
mds: update MDLog._replay_thread for locking

... no longer use mds_lock as a guard for condition variable
while waiting for journaler contexts.

Signed-off-by: John Spray <john.spray@redhat.com>
osdc: Use a finisher from Journaler

There is a choice here between having all contexts passed into
journaler be safe to call from inside the journaler lock (i.e.
caller does the C_OnFinisher wrapping), or to allow any contexts
(i.e. we wrap in a C_OnFinisher).  In this version I choose the
latter, so that callers can pass whatever they like through.

Signed-off-by: John Spray <john.spray@redhat.com>
mds: update mds_lock handling in Locker contexts

For some contexts, we expect to be called back from the objecter/filer
on an I/O completion, so we must take mds_lock before updating any
MDS metadata.  In others, we expect to be called back from the MDCache
in response to updates to a CInode's state, so we assert that mds_lock
is already held.

Signed-off-by: John Spray <john.spray@redhat.com>
mds: fix Server::C_MarkEvent locking

... it should acquire mds_lock.

Signed-off-by: John Spray <john.spray@redhat.com>
mds: fix C_MDC_TruncateFinish locking

This one needed to take mds_lock, and be invoked
from a finisher.

Signed-off-by: John Spray <john.spray@redhat.com>
mds: tidy MDLog header and assert mds_lock...

... is held by callers of start_entry, to clarify that
it is still the responsibility of callers to ensure that they
do not make overlapping calls to the start_entry/submit_entry
sequence.

Signed-off-by: John Spray <john.spray@redhat.com>
mds: tighten scope of locks and error handler

call completions outside of journaler lock in places
where it's simple to do so.  maybe useful if using
non-finisher'd contexts in some places.

for error handler, define in context rather than calling back
into a MDLog member function.  One less piece of redirection.

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