From ceeebaf4a4c602895daa26df2dd9b2595a9557e6 Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Thu, 25 Oct 2012 20:26:50 +0800 Subject: [PATCH] mds: Fix stray check in Migrator::export_dir() 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 --- src/mds/Migrator.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc index 98ab4e1ffcd6f..9829d6839d55a 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; } -- 2.39.5