client: fix potentially invalid read in trim_caps

trim_dentry can potentially free an inode, so get/put
it around the block where we use the inode's dn_set.

Signed-off-by: John Spray <john.spray@redhat.com>
mds: add state for tracking RECALL progress

To be used later for generating health metrics
for clients which are failing to promptly service
CEPH_SESSION_RECALL_STATE messages.

Signed-off-by: John Spray <john.spray@redhat.com>
mds: add a health metric for failure to recall caps

Fixes: #9284

Signed-off-by: John Spray <john.spray@redhat.com>
mon: fix MDS health detail output

I fat fingered a couple of things here.

Signed-off-by: John Spray <john.spray@redhat.com>
mon: trigger transaction on MDS health changes

I think this was previously only working as a side effect
of other MDS map changes.

Signed-off-by: John Spray <john.spray@redhat.com>
client: failure injection for cap release

Used for simulating a buggy client that trips
the error detection in #9282 (warn clients
which aren't revoking caps)

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

Signed-off-by: John Spray <john.spray@redhat.com>
mds: health metric for late releasing caps

Follow up on Yan Zheng's "mds: warn clients which
aren't revoking cap" to include a health metric
for this condition as well as the clog messages.

Signed-off-by: John Spray <john.spray@redhat.com>
client: fix trim_caps for inodes in root

Previously client would fail to release caps for files
in the root directory in response to CEPH_SESSION_RECALL_STATE
messages.

Signed-off-by: John Spray <john.spray@redhat.com>
mds: collapse numerous client warnings into one

...to avoid sending O(N_clients) sized beacons.

Fixes: #9375

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

Conflicts:
	src/mds/Beacon.cc
messages: add cephfs client metadata to MClientSession

Signed-off-by: John Spray <john.spray@redhat.com>
mds: store client metadata on Session

Signed-off-by: John Spray <john.spray@redhat.com>
mds: include client metadata in `session ls`

Signed-off-by: John Spray <john.spray@redhat.com>
ceph_fuse: refactor init to make mount_point accessible

...so that we can read out the mount point between init
and start() in order to feed it to Client before it connects
to the MDS.

Signed-off-by: John Spray <john.spray@redhat.com>
client: send hostname in client metadata

Signed-off-by: John Spray <john.spray@redhat.com>
client: support inserting extra metadata fields

Signed-off-by: John Spray <john.spray@redhat.com>
ceph_fuse: include mount point in client metadata

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