summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2013-09-27 07:01:19 +0800
committerYan, Zheng <zheng.z.yan@intel.com>2013-10-05 11:31:12 +0800
commit1d14d11a786fd3c2de0f102b621fc4d099a7d05f (patch)
treeb2b84de29374198efede21e6d4aecd7c3b45855f
parent576da8e5073cb76986c9925eaa230952b62c5da9 (diff)
downloadceph-1d14d11a786fd3c2de0f102b621fc4d099a7d05f.tar.gz
mds: stop propagating rstat if freezing/frozen dirfrag is encountered.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
-rw-r--r--src/mds/CInode.cc2
-rw-r--r--src/mds/MDCache.cc7
2 files changed, 4 insertions, 5 deletions
diff --git a/src/mds/CInode.cc b/src/mds/CInode.cc
index 05df834f588..1fc57feea4d 100644
--- a/src/mds/CInode.cc
+++ b/src/mds/CInode.cc
@@ -2072,7 +2072,7 @@ void CInode::clear_ambiguous_auth()
// auth_pins
bool CInode::can_auth_pin() {
- if (is_freezing_inode() || is_frozen_inode() || is_frozen_auth_pin())
+ if (!is_auth() || is_freezing_inode() || is_frozen_inode() || is_frozen_auth_pin())
return false;
if (parent)
return parent->can_auth_pin();
diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc
index 5d0e6ca2ad0..ac08063b9d0 100644
--- a/src/mds/MDCache.cc
+++ b/src/mds/MDCache.cc
@@ -1982,8 +1982,8 @@ void MDCache::predirty_journal_parents(Mutation *mut, EMetaBlob *blob,
}
bool stop = false;
- if (!pin->is_auth() || pin->is_ambiguous_auth()) {
- dout(10) << "predirty_journal_parents !auth or ambig on " << *pin << dendl;
+ if (!pin->can_auth_pin() || pin->is_ambiguous_auth()) {
+ dout(10) << "predirty_journal_parents can't auth pin or ambig on " << *pin << dendl;
stop = true;
}
@@ -2008,8 +2008,7 @@ void MDCache::predirty_journal_parents(Mutation *mut, EMetaBlob *blob,
if (!stop &&
mut->wrlocks.count(&pin->nestlock) == 0 &&
- (!pin->can_auth_pin() ||
- !pin->versionlock.can_wrlock() || // make sure we can take versionlock, too
+ (!pin->versionlock.can_wrlock() || // make sure we can take versionlock, too
//true
!mds->locker->wrlock_start(&pin->nestlock, static_cast<MDRequest*>(mut), true) // can cast only because i'm passing nowait=true
)) { // ** do not initiate.. see above comment **