ceph: check inode caps in ceph_d_revalidate

Some inodes in readdir reply may have no caps. Getattr mds request
for inode with no caps may return -ESTALE. The fix is consider dentry
that links to inode with no caps as invalid. Invalid dentry causes a
lookup request to send to the mds, the MDS will send caps back.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
ceph: handle session flush message

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
ceph: remove exported caps when handling cap import message

Version 3 cap import message includes the ID of the exported
caps. It allow us to remove the exported caps if we still haven't
received the corresponding cap export message.

We remove the exported caps because they are stale, keeping them
can compromise consistence.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
ceph: add open export target session helper

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
ceph: add imported caps when handling cap export message

Version 3 cap export message includes information about the imported
caps. It allows us to add the imported caps if the corresponding cap
import message still hasn't been received.

This allow us to handle situation that the importer MDS crashes and
the cap import message is missing.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
libceph: add CEPH_FEATURE_EXPORT_PEER

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>