client: implement RDCACHE reference tracking

make the code be able to track Fc caps used by aysnc buffer reads

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
client: hold Fcr caps during readahead

Fcr caps prevent the file from being truncated.

Fixes: #7958
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
client: assign implemented caps to caps field of MClientCaps

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
client: properly retain used caps

Pass properly 'retain' to Client::send_cap() because it is used to
adjust cap->issued.

Also make Client::encode_inode_release() not release used/dirty caps.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
client: drop Fr cap before gettattr CEPH_STAT_CAP_SIZE

When MDS receives the getattr request, corresponding inode's filelock
can be in unstable state which waits for client's Fr cap.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
client: cleanup Client::_invalidate_inode_cache()

drop parameter 'keep_caps'

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
ObjectCacher: assert no waiter when remove buffer head

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
client: fix null pointer dereference in Client::unlink

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