} else {
mdcache->dump_cache(path);
}
+ } else if (command == "dump tree") {
+ string root;
+ int64_t depth;
+ cmd_getval(g_ceph_context, cmdmap, "root", root);
+ if (!cmd_getval(g_ceph_context, cmdmap, "depth", depth))
+ depth = -1;
+ {
+ Mutex::Locker l(mds_lock);
+ mdcache->dump_cache(root, depth, f);
+ }
} else if (command == "force_readonly") {
- mds_lock.Lock();
+ Mutex::Locker l(mds_lock);
mdcache->force_readonly();
- mds_lock.Unlock();
} else if (command == "dirfrag split") {
- Mutex::Locker l(mds_lock);
command_dirfrag_split(cmdmap, ss);
} else if (command == "dirfrag merge") {
- Mutex::Locker l(mds_lock);
command_dirfrag_merge(cmdmap, ss);
} else if (command == "dirfrag ls") {
- Mutex::Locker l(mds_lock);
command_dirfrag_ls(cmdmap, ss, f);
} else {
return false;