From: John Spray Date: Thu, 28 Jul 2016 10:35:20 +0000 (+0100) Subject: Merge pull request #9925 from fullerdj/wip-djf-11171 X-Git-Tag: ses5-milestone5~273 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ec6dab79a34f6453aa0c9ac13a97de6fad2daae9;p=ceph.git Merge pull request #9925 from fullerdj/wip-djf-11171 mds: Add path filtering for dump cache Reviewed-by: John Spray --- ec6dab79a34f6453aa0c9ac13a97de6fad2daae9 diff --cc src/mds/MDSRank.cc index 4e9484378f22,8dd1c4f39788..d379a7f2db6f --- a/src/mds/MDSRank.cc +++ b/src/mds/MDSRank.cc @@@ -1776,14 -1758,28 +1776,24 @@@ bool MDSRankDispatcher::handle_asok_com } 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;