mds: cleanup usage of MDCache::predirty_journal_parent()

The sixth parameter of MDCache::predirty_journal_parent() is 'int'
with default value 0.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
mds: avoid journaling unnecessary dir context

If base inode is reached, try clearing the 'maybe' list, then stop.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
mds: propagate inode rstat if it has never been propagated

Otherwise the 'last_dirstat_prop' of directory inode keeps in 'never'
state.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
mds: properly clear new flag for stale client cap

CInode::encode_inodestat() should clear the 'new' flag of client
cap even when session is stale, because the 'new' flag prevents
Locker::issue_caps() from sending cap message to client.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
mds: revert EMetaBlob::{fullbit,remotebit,nullbit} encoding optimization

Revert commit 40d56a97 (mds: optimize EMetaBlob::fullbit, remotebit,
nullbit encoding). This optimization creates small segments in the
result bufferlist of encoding EMetaBlob. Perf shows lots of CPU time
are used for allocating list node for bufferlist.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
mds: deny reconnect for closed session

The client that tries reconnect may have dirty caps and unsafe requests.
Allowing the reconnect attempt may compromise consistency.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
mds: lower IO priority of storing backtrace

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Merge pull request #1802 from ceph/wip-mds-misc

Wip mds misc

Reviewed-by: Sage Weil <sage@inktank.com>