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] mds: Use stray dir as base inode for stray reintegration
Date: Wed,  3 Oct 2012 19:40:12 +0800	[thread overview]
Message-ID: <1349264412-31444-1-git-send-email-zheng.z.yan@intel.com> (raw)

From: "Yan, Zheng" <zheng.z.yan@intel.com>

Server::handle_client_rename() only skips common ancestor check
if source path's base inode is stray directory, but source path's
base inode is mdsdir in the stray reintegration case.

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

diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc
index 8b02b8b..32c9e36 100644
--- a/src/mds/MDCache.cc
+++ b/src/mds/MDCache.cc
@@ -8288,8 +8288,7 @@ void MDCache::reintegrate_stray(CDentry *straydn, CDentry *rdn)
   dout(10) << "reintegrate_stray " << *straydn << " into " << *rdn << dendl;
   
   // rename it to another mds.
-  filepath src;
-  straydn->make_path(src);
+  filepath src(straydn->get_name(), straydn->get_dir()->get_inode()->ino());
   filepath dst;
   rdn->make_path(dst);
 
-- 
1.7.11.4


             reply	other threads:[~2012-10-03 11:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-03 11:40 Yan, Zheng [this message]
2012-10-03 15:17 ` [PATCH] mds: Use stray dir as base inode for stray reintegration Sage Weil
2012-10-03 16:01   ` Yan, Zheng

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=1349264412-31444-1-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.