diff mbox

[2/4] mds: Fix stray check in Migrator::export_dir()

Message ID 1351168012-4981-2-git-send-email-zheng.z.yan@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Yan, Zheng Oct. 25, 2012, 12:26 p.m. UTC
From: "Yan, Zheng" <zheng.z.yan@intel.com>

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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc
index 98ab4e1..9829d68 100644
--- a/src/mds/Migrator.cc
+++ b/src/mds/Migrator.cc
@@ -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;
   }