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 v3] mds: Adjust mydir auth when starting MDS that was stopped cleanly
Date: Tue, 25 Sep 2012 13:46:06 +0800	[thread overview]
Message-ID: <1348551966-14718-1-git-send-email-zheng.z.yan@intel.com> (raw)

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

When starting a MDS that was stopped cleanly, we need manually
adjust mydir's auth. This is because MDS log is empty in this case,
mydir's auth can not be adjusted during log replay.

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

diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc
index da3affb..3784b14 100644
--- a/src/mds/MDCache.cc
+++ b/src/mds/MDCache.cc
@@ -565,6 +565,7 @@ void MDCache::open_root()
   }
   CDir *mydir = myin->get_or_open_dirfrag(this, frag_t());
   assert(mydir);
+  adjust_subtree_auth(mydir, mds->whoami);
 
   populate_mydir();
 }
diff --git a/src/mds/MDS.cc b/src/mds/MDS.cc
index d0aac30..8ad901a 100644
--- a/src/mds/MDS.cc
+++ b/src/mds/MDS.cc
@@ -1229,10 +1229,10 @@ void MDS::starting_done()
   assert(is_starting());
   request_state(MDSMap::STATE_ACTIVE);
 
+  mdcache->open_root();
+
   // start new segment
   mdlog->start_new_segment(0);
-
-  mdcache->open_root();
 }
 
 
-- 
1.7.11.4


             reply	other threads:[~2012-09-25  5:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-25  5:46 Yan, Zheng [this message]
2012-09-25 15:15 ` [PATCH v3] mds: Adjust mydir auth when starting MDS that was stopped cleanly 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=1348551966-14718-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.