All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yan, Zheng" <zheng.z.yan@intel.com>
To: sage@inktank.com, ceph-devel@vger.kernel.org
Cc: "Yan, Zheng" <zheng.z.yan@intel.com>
Subject: [PATCH 2/4] mds: Fix stray check in Migrator::export_dir()
Date: Thu, 25 Oct 2012 20:26:50 +0800	[thread overview]
Message-ID: <1351168012-4981-2-git-send-email-zheng.z.yan@intel.com> (raw)
In-Reply-To: <1351168012-4981-1-git-send-email-zheng.z.yan@intel.com>

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 --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;
   }
-- 
1.7.11.7


  reply	other threads:[~2012-10-25 12:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-25 12:26 [PATCH 1/4] mds: fix stray migration/reintegration check in handle_client_rename Yan, Zheng
2012-10-25 12:26 ` Yan, Zheng [this message]
2012-10-25 12:26 ` [PATCH 3/4] mds: Send mdsdir as base inode for rejoins Yan, Zheng
2012-10-25 12:26 ` [PATCH 4/4] mds: Allow evaluating locks in replica object Yan, Zheng
2012-10-26 22:49   ` Sage Weil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1351168012-4981-2-git-send-email-zheng.z.yan@intel.com \
    --to=zheng.z.yan@intel.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=sage@inktank.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.