summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2013-09-04 13:58:49 +0800
committerYan, Zheng <zheng.z.yan@intel.com>2013-09-22 14:14:20 +0800
commit0f3ba2974f3e73b4a6e494e19a669fd1d5bf50dd (patch)
tree8b91819301aa3a73385a57a404a55240b65093ef
parentcbf1f3ca1e6e0b38c9f37a44983c10654380e1d1 (diff)
downloadceph-0f3ba2974f3e73b4a6e494e19a669fd1d5bf50dd.tar.gz
mds: remove unnecessary MDCache::maybe_eval_stray() calls
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>
-rw-r--r--src/mds/CInode.cc1
-rw-r--r--src/mds/Locker.cc5
-rw-r--r--src/mds/MDCache.cc7
3 files changed, 0 insertions, 13 deletions
diff --git a/src/mds/CInode.cc b/src/mds/CInode.cc
index bcc7cc674ed..7accc5a4dba 100644
--- a/src/mds/CInode.cc
+++ b/src/mds/CInode.cc
@@ -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)
diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc
index 99bd761e0f7..19c9176f414 100644
--- a/src/mds/Locker.cc
+++ b/src/mds/Locker.cc
@@ -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);
}
diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc
index d6562e39b7f..597f22b0deb 100644
--- a/src/mds/MDCache.cc
+++ b/src/mds/MDCache.cc
@@ -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()