]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: skip scrubbing remote linkage
authorYan, Zheng <zyan@redhat.com>
Tue, 10 Nov 2015 11:58:00 +0000 (19:58 +0800)
committerYan, Zheng <zyan@redhat.com>
Tue, 10 Nov 2015 11:58:57 +0000 (19:58 +0800)
Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/mds/CDir.cc

index 0cfb0faa670ddf6af63cadb9b9accdf04a57d278..379d0546adafa5d4f3dd2fcd40f919b8453db4f6 100644 (file)
@@ -2909,11 +2909,15 @@ void CDir::scrub_initialize()
     if (i->first.snapid != CEPH_NOSNAP)
       continue;
 
-    CInode *in = i->second->get_projected_linkage()->get_inode();
-    if (in && in->is_dir())
-      scrub_infop->directories_to_scrub.insert(i->first);
-    else if (in)
-      scrub_infop->others_to_scrub.insert(i->first);
+    CDentry::linkage_t *dnl = i->second->get_projected_linkage();
+    if (dnl->is_primary()) {
+      if (dnl->get_inode()->is_dir())
+       scrub_infop->directories_to_scrub.insert(i->first);
+      else
+       scrub_infop->others_to_scrub.insert(i->first);
+    } else if (dnl->is_remote()) {
+      // TODO: check remote linkage
+    }
   }
   scrub_infop->directory_scrubbing = true;