return;
}
+ if (!force_print && subtrees.size() > SUBTREES_COUNT_THRESHOLD &&
+ !g_conf()->subsys.should_gather<ceph_subsys_mds, 25>()) {
+ dout(ceph::dout::need_dynamic(dbl)) << "number of subtrees = " << subtrees.size() << "; not "
+ "printing subtrees" << dendl;
+ return;
+ }
+
// root frags
- list<CDir*> basefrags;
+ std::vector<CDir*> basefrags;
for (set<CInode*>::iterator p = base_inodes.begin();
p != base_inodes.end();
++p)
}
}
+ if (!force_print && depth > SUBTREES_DEPTH_THRESHOLD &&
+ !g_conf()->subsys.should_gather<ceph_subsys_mds, 25>()) {
+ dout(ceph::dout::need_dynamic(dbl)) << "max depth among subtrees = " << depth << "; not printing "
+ "subtrees" << dendl;
+ return;
+ }
// print tree
- for (list<CDir*>::iterator p = basefrags.begin(); p != basefrags.end(); ++p)
- q.push_back(pair<CDir*,int>(*p, 0));
+ for (const auto& dir : basefrags) {
+ q.emplace_back(dir, 0);
+ }
while (!q.empty()) {
CDir *dir = q.front().first;