mds: trim non-auth subtree more aggressively

When a non-auth dirfrag is pinned by uncommitted slave update,
there still can be non-auth child dirfrags that are trimmable.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
mds: don't start new segment while finishing disambiguate imports

This avoid inserting ESubtreeMap among EImportFinish events that
finish disambiguate imports. Because the ESubtreeMap reflects the
subtree state when all EImportFinish events are replayed.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
mds: treat cluster as degraded when there is clientreplay MDS

This forbids exporting subtrees and fragmenting dirfrags when there
is MDS in clientreplay state. During replaying client requests, the
MDS may need to authpin some remote objects. Exporting subtrees and
fragmenting dirfrags slow down replaying client requests.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
mds: handle freeze authpin race

For across authority rename, the MDS first freezes the source inode's
authpin. It happens while the source dentry isn't locked. So when the
inode's authpin become frozen, the source dentry may have changed and
be linked to a different inode.

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

Wip multimds

Reviewed-by: Sage Weil <sage@inktank.com>
mds: add dentries in dirfrag to LRU in reverse order

Files in a dirfrag are usually processed in the order of readdir
results. Files at the beginning of are more likely to be used in
the future than files at the last.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
mds: initialize bloom filter according to dirfrag size

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
mds: ignore CDir::check_rstats() when debug_scatterstat is off

It uses lots of CPU when dirfrag is large

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

Wip largedir

Reviewed-by: Sage Weil <sage@inktank.com>
mds: fix check for merging/spliting dirfrag

check actual number of items instead of number of cached items

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
init.d: correcting rbdmap init order:

 * Require "$remote_fs" since it guarantees /usr availability
   (rbd executable is in /usr/bin/rbd)
 * Speed-up init.d rbd mapping on machines acting as MON/OSD
   by starting rbdmap after /init.d/ceph (when possible) and
   shutting down rbd before ceph.
 * Map rbd devices before starting X (helpful when /home is mounted from rbd).
Merge pull request #1587 from onlyjob/debian

init.d: correcting rbdmap LSB header / init order:

Reviewed-by: Sage Weil <sage@inktank.com>
Merge pull request #1586 from ceph/wip-dirfrag

mds: fix check for merging/spliting dirfrag

Reviewed-by: Sage Weil <sage@inktank.com>
ReplicatedPG::_scrub: don't bail early for snapdir

Fixes: #7937
Signed-off-by: Samuel Just <sam.just@inktank.com>
Merge remote-tracking branches 'origin/wip-sam-testing2', 'upstream/wip-7659', 'origin/wip-7904', 'origin/wip-7831', 'origin/wip-7916', 'origin/wip-7939', 'upstream/wip-7907' and 'origin/wip-7941' into wip-sam-testing
Merge remote-tracking branch 'upstream/wip-7937' into wip-sam-testing

Conflicts:
	src/osd/ReplicatedPG.cc