]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: remove unnecessary MDCache::maybe_eval_stray() calls
authorYan, Zheng <zheng.z.yan@intel.com>
Wed, 4 Sep 2013 05:58:49 +0000 (13:58 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Sun, 22 Sep 2013 06:14:20 +0000 (14:14 +0800)
Now we call MDCache::maybe_eval_stray() in MDSCacheObject::put().
So there is no need to call MDCache::maybe_eval_stray() after
releasing inode/dentry's refernece.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/mds/CInode.cc
src/mds/Locker.cc
src/mds/MDCache.cc

index bcc7cc674edcf40986e02ff2206ad17c6fcf654b..7accc5a4dbaa7566f9d20397f06fc879ca81d55a 100644 (file)
@@ -1079,7 +1079,6 @@ void CInode::_stored_backtrace(version_t v, Context *fin)
     clear_dirty_parent();
   if (fin)
     fin->complete(0);
-  mdcache->maybe_eval_stray(this);
 }
 
 void CInode::_mark_dirty_parent(LogSegment *ls, bool dirty_pool)
index 99bd761e0f7c3b77a646511253f2d78d244a2382..19c9176f4141202a2783d4060d2dad54ecdb3525 100644 (file)
@@ -1640,9 +1640,6 @@ void Locker::file_update_finish(CInode *in, Mutation *mut, bool share, client_t
       share_inode_max_size(in);
   }
   issue_caps_set(need_issue);
-
-  // unlinked stray?  may need to purge (e.g., after all caps are released)
-  mdcache->maybe_eval_stray(in);
 }
 
 Capability* Locker::issue_new_caps(CInode *in,
@@ -3011,8 +3008,6 @@ void Locker::remove_client_cap(CInode *in, client_t client)
   }
   
   try_eval(in, CEPH_CAP_LOCKS);
-
-  mds->mdcache->maybe_eval_stray(in);
 }
 
 
index d6562e39b7fd9051bb8116cff098912b6d0cda5e..597f22b0debb1553132d82eb51400cf76afa135e 100644 (file)
@@ -6741,9 +6741,6 @@ void MDCache::inode_remove_replica(CInode *in, int from, set<SimpleLock *>& gath
   if (in->nestlock.remove_replica(from)) gather_locks.insert(&in->nestlock);
   if (in->flocklock.remove_replica(from)) gather_locks.insert(&in->flocklock);
   if (in->policylock.remove_replica(from)) gather_locks.insert(&in->policylock);
-
-  // trim?
-  maybe_eval_stray(in);
 }
 
 void MDCache::dentry_remove_replica(CDentry *dn, int from, set<SimpleLock *>& gather_locks)
@@ -6753,10 +6750,6 @@ void MDCache::dentry_remove_replica(CDentry *dn, int from, set<SimpleLock *>& ga
   // fix lock
   if (dn->lock.remove_replica(from))
     gather_locks.insert(&dn->lock);
-
-  CDentry::linkage_t *dnl = dn->get_projected_linkage();
-  if (dnl->is_primary())
-    maybe_eval_stray(dnl->get_inode());
 }
 
 void MDCache::trim_client_leases()