]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: allow scrubbing mdsdir
authorYan, Zheng <zyan@redhat.com>
Mon, 16 Apr 2018 02:59:42 +0000 (10:59 +0800)
committerYan, Zheng <zyan@redhat.com>
Thu, 19 Apr 2018 04:56:38 +0000 (12:56 +0800)
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
src/mds/MDCache.cc

index 6803eeadee2ff23714bf4ac173f0880091f8cb2a..4ef6e37c41131729a780834edc75a68bd71315c9 100644 (file)
@@ -12262,8 +12262,13 @@ void MDCache::enqueue_scrub(
 {
   dout(10) << __func__ << " " << path << dendl;
   MDRequestRef mdr = request_start_internal(CEPH_MDS_OP_ENQUEUE_SCRUB);
-  filepath fp(path);
-  mdr->set_filepath(fp);
+  if (path == "~mdsdir") {
+    filepath fp(MDS_INO_MDSDIR(mds->get_nodeid()));
+    mdr->set_filepath(fp);
+  } else {
+    filepath fp(path);
+    mdr->set_filepath(path);
+  }
 
   C_MDS_EnqueueScrub *cs = new C_MDS_EnqueueScrub(f, fin);
   cs->header = std::make_shared<ScrubHeader>(