include/CompatSet: make merge const()

With usual shenanigans to deal with [] on map
not being const-safe.

Signed-off-by: John Spray <john.spray@redhat.com>
mds: extract beacon state from MDS lock

For clarity, give it its own class for the
state protected by the separate lock too.

Fixes: #9152

Signed-off-by: John Spray <john.spray@redhat.com>
mds: promote Beacon to be a Dispatcher

This allows it to handle its own MSG_MDS_BEACON
messages from the mon, outside of mds_lock.

This is less important than the sending of beacons
being outside the lock, but still nice to have and
gets all the beacon messaging in one place.

Signed-off-by: John Spray <john.spray@redhat.com>
include/CompatSet: more const-ness

Signed-off-by: John Spray <john.spray@redhat.com>
mds: const getters in MDLog

Signed-off-by: John Spray <john.spray@redhat.com>
mds: use HeartbeatMap to control beacons

...so that if something hogs mds_lock without
pinging the heartbeat map, we will stop sending
beacons to the mon and it will have the chance
to recognise that we are laggy.

Signed-off-by: John Spray <john.spray@redhat.com>
messages: add health fields to MMDSBeacon

Signed-off-by: John Spray <john.spray@redhat.com>
mds: populate health metrics in beacon

Signed-off-by: John Spray <john.spray@redhat.com>
mon: handle beacon health metrics in MDSMonitor

Fixes: #9151

Signed-off-by: John Spray <john.spray@redhat.com>
mds: add thread to progress queues outside dispatch

This speeds up processing of queued waiters.

Fixes: #9252

Signed-off-by: John Spray <john.spray@redhat.com>
mon: add MDS metric metadata to health detail

This is a bit wonky because the mon health structure expects
a string, and we have a key-val structure, but it's better
to output this somehow than to have it rot as a purely internal
thing.

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

Wip 9151 + 9152

Reviewed-by: Sage Weil <sage@redhat.com>