mds: fix MDLog I/O callback without finisher

This could deadlock if another caller was waiting
on a write_head callback while holding mds_lock.

Signed-off-by: John Spray <john.spray@redhat.com>
mds: in segment expiry, use end instead of start

Previously we were always leaving the last log
segment un-expired from Journaler's POV, because
we were updating expire_pos to the *start* of the
expired journal segment instead of the *end*.

This was harmless, but cleaning it up makes it
easier to see what's going on during journal flushes
in testing.

Signed-off-by: John Spray <john.spray@redhat.com>
mds: implement "flush journal" asok

Start a new segment and flush everything older
to the backing store.

Signed-off-by: John Spray <john.spray@redhat.com>
Merge pull request #2855 from ceph/wip-9881

#9881 MDS flush journal asok command

Reviewed-by: Yan, Zheng <zyan@redhat.com>