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 3/4] mds: Send mdsdir as base inode for rejoins
Date: Thu, 25 Oct 2012 20:26:51 +0800	[thread overview]
Message-ID: <1351168012-4981-3-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>

Stray dir inodes are no longer base inodes, they are in the mdsdir
and the mdrdir is base inode.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
---
 src/mds/MDCache.cc | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc
index 8598f46..8c83abc 100644
--- a/src/mds/MDCache.cc
+++ b/src/mds/MDCache.cc
@@ -3315,10 +3315,9 @@ void MDCache::rejoin_send_rejoins()
 	  p->second->add_scatterlock_state(root);
 	}
       }
-      for (int i = 0; i < NUM_STRAY; ++i) {
-	CInode *s = get_inode(MDS_INO_STRAY(p->first, i)); 
-	if (s)
-	  p->second->add_weak_inode(s->vino());
+      if (CInode *in = get_inode(MDS_INO_MDSDIR(p->first))) { 
+	if (in)
+	  p->second->add_weak_inode(in->vino());
       }
     } else {
       // strong
@@ -3334,15 +3333,14 @@ void MDCache::rejoin_send_rejoins()
 	  p->second->add_scatterlock_state(root);
 	}
       }
-      for (int i = 0; i < NUM_STRAY; ++i) {
-	if (CInode *in = get_inode(MDS_INO_STRAY(p->first, i))) {
-	  p->second->add_weak_inode(in->vino());
-	  p->second->add_strong_inode(in->vino(),
-				      in->get_caps_wanted(),
-				      in->filelock.get_state(),
-				      in->nestlock.get_state(),
-				      in->dirfragtreelock.get_state());
-	}
+
+      if (CInode *in = get_inode(MDS_INO_MDSDIR(p->first))) {
+	p->second->add_weak_inode(in->vino());
+	p->second->add_strong_inode(in->vino(),
+				    in->get_caps_wanted(),
+				    in->filelock.get_state(),
+				    in->nestlock.get_state(),
+				    in->dirfragtreelock.get_state());
       }
     }
   }  
-- 
1.7.11.7


  parent reply	other threads:[~2012-10-25 12:27 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 ` [PATCH 2/4] mds: Fix stray check in Migrator::export_dir() Yan, Zheng
2012-10-25 12:26 ` Yan, Zheng [this message]
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-3-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.