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: fix FP error in ROUND_UP_TO

Explicitly handle case where denominator is 0, instead of
passing into ROUND_UP_TO.

Regression from 9449520b121fc6ce0c64948386d4ff77f46f4f5f

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>