]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: Fix stray check in Migrator::export_dir()
authorYan, Zheng <zheng.z.yan@intel.com>
Thu, 25 Oct 2012 12:26:50 +0000 (20:26 +0800)
committerSage Weil <sage@inktank.com>
Fri, 26 Oct 2012 22:43:07 +0000 (15:43 -0700)
Commit f8110c (Allow export subtrees in other MDS' stray directory)
make the "directory in stray " check always return false. This is
because the directory in question is grandchild of mdsdir.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/mds/Migrator.cc

index 98ab4e1ffcd6f5fa882e0c4e06f4a7bcea9a2875..9829d6839d55ab586b11ec0f45ed98bba18d87ea 100644 (file)
@@ -640,8 +640,8 @@ void Migrator::export_dir(CDir *dir, int dest)
     return;
   }
 
-  if (!dir->inode->is_base() &&
-      dir->inode->get_parent_dir()->ino() == MDS_INO_MDSDIR(mds->get_nodeid())) {
+  if (!dir->inode->is_base() && dir->get_parent_dir()->get_inode()->is_stray() &&
+      dir->get_parent_dir()->get_parent_dir()->ino() == MDS_INO_MDSDIR(mds->get_nodeid())) {
     dout(7) << "i won't export anything in stray" << dendl;
     return;
   }