From: Yan, Zheng Date: Mon, 10 Apr 2017 11:54:47 +0000 (+0800) Subject: mds: track dentries that should be trimmed quickly in separate list X-Git-Tag: v12.1.0~10^2~28^2~14 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9317782b0e661610e63e7b214fcb97035032e0ee;p=ceph.git mds: track dentries that should be trimmed quickly in separate list To trim a null dentry quickly, current method is moving it to bottom of LRU list. The method depends on the cache size config and if there is non-null dentry at the bottom of LRU list (MDCache::trim() keeps trimming null dentries regardless of cache size config. It stops when encountering a non-null dentry). MDS can move dentry of any type to bottom of the LRU, so the method does not work as expected. Besides, it's hard to extend the code to trim other type of dentry quickly. The fix is use separate list to track dentries that should be trimmed quickly. Both null dentries and non-auth stray dentries are added to the list. Signed-off-by: "Yan, Zheng" --- diff --git a/src/mds/CDentry.cc b/src/mds/CDentry.cc index 7eeba7e753cd..44dc6d52a522 100644 --- a/src/mds/CDentry.cc +++ b/src/mds/CDentry.cc @@ -88,7 +88,9 @@ ostream& operator<<(ostream& out, const CDentry& dn) out << " inode=" << dn.get_linkage()->get_inode(); - if (dn.is_new()) out << " state=new"; + out << " state=" << dn.get_state(); + if (dn.is_new()) out << "|new"; + if (dn.state_test(CDentry::STATE_BOTTOMLRU)) out << "|bottomlru"; if (dn.get_num_ref()) { out << " |"; diff --git a/src/mds/CDentry.h b/src/mds/CDentry.h index 175ce4fc1e76..01e3d3c49920 100644 --- a/src/mds/CDentry.h +++ b/src/mds/CDentry.h @@ -86,8 +86,10 @@ public: static const int STATE_BADREMOTEINO = (1<<3); static const int STATE_EVALUATINGSTRAY = (1<<4); static const int STATE_PURGINGPINNED = (1<<5); + static const int STATE_BOTTOMLRU = (1<<6); // stray dentry needs notification of releasing reference static const int STATE_STRAY = STATE_NOTIFYREF; + static const int MASK_STATE_IMPORT_KEPT = STATE_BOTTOMLRU; // -- pins -- static const int PIN_INODEPIN = 1; // linked inode is pinned @@ -289,7 +291,7 @@ public: ::decode(replica_map, blp); // twiddle - state = 0; + state &= MASK_STATE_IMPORT_KEPT; state_set(CDentry::STATE_AUTH); if (nstate & STATE_DIRTY) _mark_dirty(ls); diff --git a/src/mds/CDir.cc b/src/mds/CDir.cc index 03ba644631ec..eb813c9a7e06 100644 --- a/src/mds/CDir.cc +++ b/src/mds/CDir.cc @@ -328,7 +328,9 @@ CDentry* CDir::add_null_dentry(const string& dname, CDentry* dn = new CDentry(dname, inode->hash_dentry_name(dname), first, last); if (is_auth()) dn->state_set(CDentry::STATE_AUTH); - cache->lru.lru_insert_mid(dn); + + cache->bottom_lru.lru_insert_mid(dn); + dn->state_set(CDentry::STATE_BOTTOMLRU); dn->dir = this; dn->version = get_projected_version(); @@ -369,7 +371,12 @@ CDentry* CDir::add_primary_dentry(const string& dname, CInode *in, CDentry* dn = new CDentry(dname, inode->hash_dentry_name(dname), first, last); if (is_auth()) dn->state_set(CDentry::STATE_AUTH); - cache->lru.lru_insert_mid(dn); + if (is_auth() || !inode->is_stray()) { + cache->lru.lru_insert_mid(dn); + } else { + cache->bottom_lru.lru_insert_mid(dn); + dn->state_set(CDentry::STATE_BOTTOMLRU); + } dn->dir = this; dn->version = get_projected_version(); @@ -482,7 +489,10 @@ void CDir::remove_dentry(CDentry *dn) if (dn->is_dirty()) dn->mark_clean(); - cache->lru.lru_remove(dn); + if (dn->state_test(CDentry::STATE_BOTTOMLRU)) + cache->bottom_lru.lru_remove(dn); + else + cache->lru.lru_remove(dn); delete dn; // unpin? @@ -503,6 +513,12 @@ void CDir::link_remote_inode(CDentry *dn, inodeno_t ino, unsigned char d_type) dn->get_linkage()->set_remote(ino, d_type); + if (dn->state_test(CDentry::STATE_BOTTOMLRU)) { + cache->bottom_lru.lru_remove(dn); + cache->lru.lru_insert_mid(dn); + dn->state_clear(CDentry::STATE_BOTTOMLRU); + } + if (dn->last == CEPH_NOSNAP) { num_head_items++; num_head_null--; @@ -522,6 +538,13 @@ void CDir::link_primary_inode(CDentry *dn, CInode *in) in->set_primary_parent(dn); link_inode_work(dn, in); + + if (dn->state_test(CDentry::STATE_BOTTOMLRU) && + (is_auth() || !inode->is_stray())) { + cache->bottom_lru.lru_remove(dn); + cache->lru.lru_insert_mid(dn); + dn->state_clear(CDentry::STATE_BOTTOMLRU); + } if (dn->last == CEPH_NOSNAP) { num_head_items++; @@ -557,7 +580,7 @@ void CDir::link_inode_work( CDentry *dn, CInode *in) in->move_to_realm(inode->find_snaprealm()); } -void CDir::unlink_inode(CDentry *dn) +void CDir::unlink_inode(CDentry *dn, bool adjust_lru) { if (dn->get_linkage()->is_primary()) { dout(12) << "unlink_inode " << *dn << " " << *dn->get_linkage()->get_inode() << dendl; @@ -567,6 +590,12 @@ void CDir::unlink_inode(CDentry *dn) unlink_inode_work(dn); + if (adjust_lru && !dn->state_test(CDentry::STATE_BOTTOMLRU)) { + cache->lru.lru_remove(dn); + cache->bottom_lru.lru_insert_mid(dn); + dn->state_set(CDentry::STATE_BOTTOMLRU); + } + if (dn->last == CEPH_NOSNAP) { num_head_items--; num_head_null++; @@ -726,15 +755,6 @@ void CDir::try_remove_dentries_for_stray() mark_clean(); } -void CDir::touch_dentries_bottom() { - dout(12) << "touch_dentries_bottom " << *this << dendl; - - for (CDir::map_t::iterator p = items.begin(); - p != items.end(); - ++p) - inode->mdcache->touch_dentry_bottom(p->second); -} - bool CDir::try_trim_snap_dentry(CDentry *dn, const set& snaps) { assert(dn->last != CEPH_NOSNAP); diff --git a/src/mds/CDir.h b/src/mds/CDir.h index 3a65a82b3e0b..4c90292df33b 100644 --- a/src/mds/CDir.h +++ b/src/mds/CDir.h @@ -450,7 +450,7 @@ protected: void link_remote_inode( CDentry *dn, inodeno_t ino, unsigned char d_type); void link_remote_inode( CDentry *dn, CInode *in ); void link_primary_inode( CDentry *dn, CInode *in ); - void unlink_inode( CDentry *dn ); + void unlink_inode(CDentry *dn, bool adjust_lru=true); void try_remove_unlinked_dn(CDentry *dn); void add_to_bloom(CDentry *dn); @@ -465,7 +465,6 @@ private: void remove_null_dentries(); void purge_stale_snap_data(const std::set& snaps); public: - void touch_dentries_bottom(); void try_remove_dentries_for_stray(); bool try_trim_snap_dentry(CDentry *dn, const std::set& snaps); diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index fcdcc2c57c47..eee9c0a61abe 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -205,6 +205,9 @@ MDCache::MDCache(MDSRank *m, PurgeQueue &purge_queue_) : lru.lru_set_max(g_conf->mds_cache_size); lru.lru_set_midpoint(g_conf->mds_cache_mid); + bottom_lru.lru_set_max(0); + bottom_lru.lru_set_midpoint(0); + decayrate.set_halflife(g_conf->mds_decay_halflife); did_shutdown_log_cap = false; @@ -3656,7 +3659,7 @@ void MDCache::remove_inode_recursive(CInode *in) CDentry::linkage_t *dnl = dn->get_linkage(); if (dnl->is_primary()) { CInode *tin = dnl->get_inode(); - subdir->unlink_inode(dn); + subdir->unlink_inode(dn, false); remove_inode_recursive(tin); } subdir->remove_dentry(dn); @@ -6410,7 +6413,8 @@ bool MDCache::trim(int max, int count) if (max <= 0) return false; } - dout(7) << "trim max=" << max << " cur=" << lru.lru_get_size() << dendl; + dout(7) << "trim max=" << max << " cur=" << lru.lru_get_size() + << "/" << bottom_lru.lru_get_size() << dendl; // process delayed eval_stray() stray_manager.advance_delayed(); @@ -6420,22 +6424,26 @@ bool MDCache::trim(int max, int count) int unexpirable = 0; list unexpirables; + for (;;) { + CDentry *dn = static_cast(bottom_lru.lru_expire()); + if (!dn) + break; + if (trim_dentry(dn, expiremap)) { + unexpirables.push_back(dn); + ++unexpirable; + } + } + + for(auto dn : unexpirables) + bottom_lru.lru_insert_mid(dn); + unexpirables.clear(); + // trim dentries from the LRU: only enough to satisfy `max`, - // unless we see null dentries at the bottom of the LRU, - // in which case trim all those. - bool trimming_nulls = true; - while (trimming_nulls || lru.lru_get_size() + unexpirable > (unsigned)max) { + while (lru.lru_get_size() + unexpirable > (unsigned)max) { CDentry *dn = static_cast(lru.lru_expire()); if (!dn) { break; } - if (!dn->get_linkage()->is_null()) { - trimming_nulls = false; - if (lru.lru_get_size() + unexpirable < (unsigned)max) { - unexpirables.push_back(dn); - break; - } - } if ((is_standby_replay && dn->get_linkage()->inode && dn->get_linkage()->inode->item_open_file.is_on_list()) || trim_dentry(dn, expiremap)) { @@ -6443,10 +6451,9 @@ bool MDCache::trim(int max, int count) ++unexpirable; } } - for(list::iterator i = unexpirables.begin(); - i != unexpirables.end(); - ++i) - lru.lru_insert_mid(*i); + for(auto dn : unexpirables) + lru.lru_insert_mid(dn); + unexpirables.clear(); // trim non-auth, non-bound subtrees for (map >::iterator p = subtrees.begin(); @@ -6583,7 +6590,7 @@ bool MDCache::trim_dentry(CDentry *dn, map& expiremap // unlink the dentry if (dnl->is_remote()) { // just unlink. - dir->unlink_inode(dn); + dir->unlink_inode(dn, false); } else if (dnl->is_primary()) { // expire the inode, too. CInode *in = dnl->get_inode(); @@ -6753,7 +6760,7 @@ bool MDCache::trim_inode(CDentry *dn, CInode *in, CDir *con, mapget_dir()->unlink_inode(dn); + dn->get_dir()->unlink_inode(dn, false); remove_inode(in); return false; } @@ -6790,14 +6797,23 @@ void MDCache::trim_non_auth() CDentry *first_auth = 0; // trim non-auth items from the lru - while (lru.lru_get_size() > 0) { - CDentry *dn = static_cast(lru.lru_expire()); - if (!dn) break; + for (;;) { + CDentry *dn = NULL; + if (bottom_lru.lru_get_size() > 0) + dn = static_cast(bottom_lru.lru_expire()); + if (!dn && lru.lru_get_size() > 0) + dn = static_cast(lru.lru_expire()); + if (!dn) + break; + CDentry::linkage_t *dnl = dn->get_linkage(); if (dn->is_auth()) { // add back into lru (at the top) - lru.lru_insert_top(dn); + if (dn->state_test(CDentry::STATE_BOTTOMLRU)) + bottom_lru.lru_insert_mid(dn); + else + lru.lru_insert_top(dn); if (dnl->is_remote() && dnl->get_inode() && !dnl->get_inode()->is_auth()) dn->unlink_remote(dnl); @@ -6816,7 +6832,7 @@ void MDCache::trim_non_auth() // unlink the dentry dout(10) << " removing " << *dn << dendl; if (dnl->is_remote()) { - dir->unlink_inode(dn); + dir->unlink_inode(dn, false); } else if (dnl->is_primary()) { CInode *in = dnl->get_inode(); @@ -6828,7 +6844,7 @@ void MDCache::trim_non_auth() assert(!subdir->is_subtree_root()); in->close_dirfrag(subdir->dirfrag().frag); } - dir->unlink_inode(dn); + dir->unlink_inode(dn, false); remove_inode(in); } else { @@ -6854,7 +6870,8 @@ void MDCache::trim_non_auth() ++p) p->first->put(CDir::PIN_SUBTREETEMP); - if (lru.lru_get_size() == 0) { + if (lru.lru_get_size() == 0 && + bottom_lru.lru_get_size() == 0) { // root, stray, etc.? ceph::unordered_map::iterator p = inode_map.begin(); while (p != inode_map.end()) { @@ -6929,7 +6946,7 @@ bool MDCache::trim_non_auth_subtree(CDir *dir) } if (!keep_inode) { // remove it! dout(20) << "trim_non_auth_subtree(" << dir << ") removing inode " << in << " with dentry" << dn << dendl; - dir->unlink_inode(dn); + dir->unlink_inode(dn, false); remove_inode(in); assert(!dir->has_bloom()); dir->remove_dentry(dn); @@ -6943,7 +6960,7 @@ bool MDCache::trim_non_auth_subtree(CDir *dir) } else { // just remove it dout(20) << "trim_non_auth_subtree(" << dir << ") removing dentry " << dn << dendl; if (dnl->is_remote()) - dir->unlink_inode(dn); + dir->unlink_inode(dn, false); dir->remove_dentry(dn); } } @@ -7430,7 +7447,7 @@ void MDCache::shutdown_check() mds->timer.add_event_after(g_conf->mds_shutdown_check, new C_MDC_ShutdownCheck(this)); // this - dout(0) << "lru size now " << lru.lru_get_size() << dendl; + dout(0) << "lru size now " << lru.lru_get_size() << "/" << bottom_lru.lru_get_size() << dendl; dout(0) << "log len " << mds->mdlog->get_num_events() << dendl; @@ -7482,7 +7499,7 @@ bool MDCache::shutdown_pass() // trim cache trim(0); - dout(5) << "lru size now " << lru.lru_get_size() << dendl; + dout(5) << "lru size now " << lru.lru_get_size() << "/" << bottom_lru.lru_get_size() << dendl; // SUBTREES int num_auth_subtree = 0; @@ -7586,8 +7603,8 @@ bool MDCache::shutdown_pass() } // trim what we can from the cache - if (lru.lru_get_size() > 0) { - dout(7) << "there's still stuff in the cache: " << lru.lru_get_size() << dendl; + if (lru.lru_get_size() > 0 || bottom_lru.lru_get_size() > 0) { + dout(7) << "there's still stuff in the cache: " << lru.lru_get_size() << "/" << bottom_lru.lru_get_size() << dendl; show_cache(); //dump(); return false; @@ -10482,7 +10499,6 @@ void MDCache::handle_dentry_unlink(MDentryUnlink *m) !in->state_test(CInode::STATE_EXPORTINGCAPS)) migrator->export_caps(in); - touch_dentry_bottom(straydn); // move stray to end of lru straydn = NULL; } else { assert(!straydn); @@ -10490,9 +10506,6 @@ void MDCache::handle_dentry_unlink(MDentryUnlink *m) dn->dir->unlink_inode(dn); } assert(dnl->is_null()); - - // move to bottom of lru - touch_dentry_bottom(dn); } } diff --git a/src/mds/MDCache.h b/src/mds/MDCache.h index 28ebc48ec8a6..3e46cb1a007c 100644 --- a/src/mds/MDCache.h +++ b/src/mds/MDCache.h @@ -114,6 +114,7 @@ class MDCache { // -- my cache -- LRU lru; // dentry lru for expiring items from cache + LRU bottom_lru; // dentries that should be trimmed ASAP protected: ceph::unordered_map inode_map; // map of inodes by ino CInode *root; // root inode @@ -766,28 +767,19 @@ public: } public: void touch_dentry(CDentry *dn) { - // touch ancestors - if (dn->get_dir()->get_inode()->get_projected_parent_dn()) - touch_dentry(dn->get_dir()->get_inode()->get_projected_parent_dn()); - - // touch me - if (dn->is_auth()) - lru.lru_touch(dn); - else - lru.lru_midtouch(dn); + if (dn->state_test(CDentry::STATE_BOTTOMLRU)) { + bottom_lru.lru_midtouch(dn); + } else { + if (dn->is_auth()) + lru.lru_touch(dn); + else + lru.lru_midtouch(dn); + } } void touch_dentry_bottom(CDentry *dn) { + if (dn->state_test(CDentry::STATE_BOTTOMLRU)) + return; lru.lru_bottouch(dn); - if (dn->get_projected_linkage()->is_primary() && - dn->get_dir()->inode->is_stray()) { - CInode *in = dn->get_projected_linkage()->get_inode(); - if (in->has_dirfrags()) { - list ls; - in->get_dirfrags(ls); - for (list::iterator p = ls.begin(); p != ls.end(); ++p) - (*p)->touch_dentries_bottom(); - } - } } protected: diff --git a/src/mds/MDLog.cc b/src/mds/MDLog.cc index 7b2826e97007..dedc0c8a4c19 100644 --- a/src/mds/MDLog.cc +++ b/src/mds/MDLog.cc @@ -849,7 +849,7 @@ void MDLog::replay(MDSInternalContextBase *c) // empty? if (journaler->get_read_pos() == journaler->get_write_pos()) { dout(10) << "replay - journal empty, done." << dendl; - mds->mdcache->trim(-1); + mds->mdcache->trim(); if (c) { c->complete(0); } diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc index 140a61592545..f15e7d03c3de 100644 --- a/src/mds/Migrator.cc +++ b/src/mds/Migrator.cc @@ -1500,13 +1500,6 @@ void Migrator::finish_export_inode(CInode *in, utime_t now, mds_rank_t peer, in->finish_export(now); finish_export_inode_caps(in, peer, peer_imported); - - // *** other state too? - - // move to end of LRU so we drop out of cache quickly! - if (in->get_parent_dn()) - cache->lru.lru_bottouch(in->get_parent_dn()); - } uint64_t Migrator::encode_export_dir(bufferlist& exportbl, diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 253d15008a4e..008beb4d24d2 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -5189,6 +5189,7 @@ void Server::_link_remote(MDRequestRef& mdr, bool inc, CDentry *dn, CInode *targ mdcache->predirty_journal_parents(mdr, &le->metablob, targeti, dn->get_dir(), PREDIRTY_DIR, -1); mdcache->journal_cow_dentry(mdr.get(), &le->metablob, dn); le->metablob.add_null_dentry(dn, true); + dn->push_projected_linkage(); } journal_and_reply(mdr, targeti, dn, le, new C_MDS_link_remote_finish(this, mdr, inc, dn, targeti)); @@ -5214,6 +5215,7 @@ void Server::_link_remote_finish(MDRequestRef& mdr, bool inc, } else { // unlink main dentry dn->get_dir()->unlink_inode(dn); + dn->pop_projected_linkage(); dn->mark_dirty(dn->get_projected_version(), mdr->ls); // dirty old dentry } @@ -7066,7 +7068,7 @@ void Server::_rename_apply(MDRequestRef& mdr, CDentry *srcdn, CDentry *destdn, C if (destdnl->is_primary()) { assert(straydn); dout(10) << "straydn is " << *straydn << dendl; - destdn->get_dir()->unlink_inode(destdn); + destdn->get_dir()->unlink_inode(destdn, false); straydn->pop_projected_linkage(); if (mdr->is_slave() && !mdr->more()->slave_update_journaled) @@ -7085,7 +7087,7 @@ void Server::_rename_apply(MDRequestRef& mdr, CDentry *srcdn, CDentry *destdn, C //oldin->open_snaprealm(); might be sufficient.. } } else if (destdnl->is_remote()) { - destdn->get_dir()->unlink_inode(destdn); + destdn->get_dir()->unlink_inode(destdn, false); if (oldin->is_auth()) oldin->pop_and_dirty_projected_inode(mdr->ls); } @@ -7119,7 +7121,7 @@ void Server::_rename_apply(MDRequestRef& mdr, CDentry *srcdn, CDentry *destdn, C } else { // primary if (linkmerge) { dout(10) << "merging primary onto remote link" << dendl; - destdn->get_dir()->unlink_inode(destdn); + destdn->get_dir()->unlink_inode(destdn, false); } destdnl = destdn->pop_projected_linkage(); if (mdr->is_slave() && !mdr->more()->slave_update_journaled) diff --git a/src/mds/StrayManager.cc b/src/mds/StrayManager.cc index f4d3ac4efc7f..8b239ea5bea1 100644 --- a/src/mds/StrayManager.cc +++ b/src/mds/StrayManager.cc @@ -237,9 +237,11 @@ void StrayManager::_purge_stray_logged(CDentry *dn, version_t pdv, LogSegment *l assert(!in->state_test(CInode::STATE_RECOVERING)); + bool new_dn = dn->is_new(); + // unlink assert(dn->get_projected_linkage()->is_null()); - dn->dir->unlink_inode(dn); + dn->dir->unlink_inode(dn, !new_dn); dn->pop_projected_linkage(); dn->mark_dirty(pdv, ls); @@ -250,12 +252,10 @@ void StrayManager::_purge_stray_logged(CDentry *dn, version_t pdv, LogSegment *l dn->put(CDentry::PIN_PURGING); // drop dentry? - if (dn->is_new()) { + if (new_dn) { dout(20) << " dn is new, removing" << dendl; dn->mark_clean(); dn->dir->remove_dentry(dn); - } else { - in->mdcache->touch_dentry_bottom(dn); // drop dn as quickly as possible. } // drop inode @@ -431,10 +431,6 @@ bool StrayManager::_eval_stray(CDentry *dn, bool delay) assert(!dn->state_test(CDentry::STATE_PURGING)); if (!dn->is_auth()) { - // has to be mine - // move to bottom of lru so that we trim quickly! - - in->mdcache->touch_dentry_bottom(dn); return false; } diff --git a/src/mds/journal.cc b/src/mds/journal.cc index 53dd3f466f13..dfb4b03ffa87 100644 --- a/src/mds/journal.cc +++ b/src/mds/journal.cc @@ -1311,8 +1311,7 @@ void EMetaBlob::replay(MDSRank *mds, LogSegment *logseg, MDSlaveUpdate *slaveup) dout(0) << ss.str() << dendl; mds->clog->warn(ss); } - dir->unlink_inode(dn); - mds->mdcache->touch_dentry_bottom(dn); + dir->unlink_inode(dn, false); } if (unlinked.count(in)) linked.insert(in); @@ -1324,9 +1323,7 @@ void EMetaBlob::replay(MDSRank *mds, LogSegment *logseg, MDSlaveUpdate *slaveup) if (dn->get_linkage()->get_inode() != in && in->get_parent_dn()) { dout(10) << "EMetaBlob.replay unlinking " << *in << dendl; unlinked[in] = in->get_parent_dir(); - CDentry *unlinked_dn = in->get_parent_dn(); in->get_parent_dir()->unlink_inode(in->get_parent_dn()); - mds->mdcache->touch_dentry_bottom(unlinked_dn); } if (dn->get_linkage()->get_inode() != in) { if (!dn->get_linkage()->is_null()) { // note: might be remote. as with stray reintegration. @@ -1338,8 +1335,7 @@ void EMetaBlob::replay(MDSRank *mds, LogSegment *logseg, MDSlaveUpdate *slaveup) dout(0) << ss.str() << dendl; mds->clog->warn(ss); } - dir->unlink_inode(dn); - mds->mdcache->touch_dentry_bottom(dn); + dir->unlink_inode(dn, false); } if (unlinked.count(in)) linked.insert(in); @@ -1384,8 +1380,7 @@ void EMetaBlob::replay(MDSRank *mds, LogSegment *logseg, MDSlaveUpdate *slaveup) << " " << *dn->get_linkage()->get_inode() << " should be remote " << p->ino; dout(0) << ss.str() << dendl; } - dir->unlink_inode(dn); - mds->mdcache->touch_dentry_bottom(dn); + dir->unlink_inode(dn, false); } dir->link_remote_inode(dn, p->ino, p->d_type); dn->set_version(p->dnv); @@ -1420,7 +1415,6 @@ void EMetaBlob::replay(MDSRank *mds, LogSegment *logseg, MDSlaveUpdate *slaveup) if (dn->get_linkage()->is_primary()) unlinked[in] = dir; dir->unlink_inode(dn); - mds->mdcache->touch_dentry_bottom(dn); } } dn->set_version(p->dnv); @@ -1434,7 +1428,6 @@ void EMetaBlob::replay(MDSRank *mds, LogSegment *logseg, MDSlaveUpdate *slaveup) // Make null dentries the first things we trim dout(10) << "EMetaBlob.replay pushing to bottom of lru " << *dn << dendl; - mds->mdcache->touch_dentry_bottom(dn); } } @@ -1643,7 +1636,6 @@ void EMetaBlob::replay(MDSRank *mds, LogSegment *logseg, MDSlaveUpdate *slaveup) if (parent) { dout(10) << "EMetaBlob.replay unlinked from dentry " << *parent << dendl; assert(parent->get_linkage()->is_null()); - mds->mdcache->touch_dentry_bottom(parent); } } else { dout(10) << "EMetaBlob.replay destroyed " << *p << ", not in cache" << dendl;