]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: stop propagating rstat if freezing/frozen dirfrag is encountered.
authorYan, Zheng <zheng.z.yan@intel.com>
Thu, 26 Sep 2013 23:01:19 +0000 (07:01 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Sat, 5 Oct 2013 03:31:12 +0000 (11:31 +0800)
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/mds/CInode.cc
src/mds/MDCache.cc

index 05df834f5882197418eaf220c5a391e9101e18f4..1fc57feea4de4a3651808986ad84b55b5f3e186b 100644 (file)
@@ -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();
index 5d0e6ca2ad029dd235962f1fd2fdb333cd6f29aa..ac08063b9d0715f28bffdd9cd35d6820afb60c66 100644 (file)
@@ -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 **