]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
Merge pull request #9925 from fullerdj/wip-djf-11171
authorJohn Spray <jspray@redhat.com>
Thu, 28 Jul 2016 10:35:20 +0000 (11:35 +0100)
committerGitHub <noreply@github.com>
Thu, 28 Jul 2016 10:35:20 +0000 (11:35 +0100)
mds: Add path filtering for dump cache

Reviewed-by: John Spray <john.spray@redhat.com>
1  2 
src/mds/MDCache.cc
src/mds/MDCache.h
src/mds/MDSDaemon.cc
src/mds/MDSRank.cc

Simple merge
Simple merge
Simple merge
index 4e9484378f2299a18a587a14646fcf0344d823ad,8dd1c4f3978864f1c4b20a7ac802243ac221b7ab..d379a7f2db6fd100791a1d5a8965f34023c45363
@@@ -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;