From 1d14d11a786fd3c2de0f102b621fc4d099a7d05f Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Fri, 27 Sep 2013 07:01:19 +0800 Subject: mds: stop propagating rstat if freezing/frozen dirfrag is encountered. Signed-off-by: Yan, Zheng --- src/mds/CInode.cc | 2 +- src/mds/MDCache.cc | 7 +++---- 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(mut), true) // can cast only because i'm passing nowait=true )) { // ** do not initiate.. see above comment ** -- cgit v1.2.1