client: vxattr support for rstat

copy the kernel client code (which uses table to present vxattrs)

Signed-off-by: Yan, Zheng <zyan@redhat.com>
Merge pull request #2373 from ceph/wip-9026

client: vxattr support for stat

Reviewed-by: Greg Farnum <greg@inktank.com>
FileStore: Remove unused code.

Signed-off-by: Ma Jianpeng <jianpeng.ma@intel.com>
Merge pull request #2392 from majianpeng/fix1

FileStore: Remove unused code.

Reviewed-by: Loic Dachary <loic@dachary.org>
client: fix crash in trim_caps

In a75af4c2, procedure was added to invalidate root's dentries
if the trimming failed to free enough caps.  This would sometimes
crash because root->dir wasn't necessarily open.

Fix by only doing it if root dir is open, though I suspect this
may not be the end of it...

Signed-off-by: John Spray <john.spray@redhat.com>
client: more precise cap trimming

Two fixes:
 * Client would unlink everything it could, instead of just
   meeting its goal, because caps.size() doesn't change until
   dentries are cleaned up later.  Take account of the trimmed
   count in the while() condition to fix that.
 * Don't count the root ino as trimmed, as although it has no
   dentries (of course), we will never give up the cap.

With this change, the client will now precisely achieve the number
of caps requested in CEPH_SESSION_RECALL_STATE messages.

Signed-off-by: John Spray <john.spray@redhat.com>
client: fix potentiall invalid read in trim_caps

trim_dentry can potentially free an inode, so get/put
it around the look 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: warn clients which aren't revoking caps

Add a list to Locker to track revoking caps. print a warning message if client does not
release caps within the given time.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
mds: add a health metric for failure to recall caps

Fixes: #9284

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