]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: don't mark dirfrag dirty after dropping stale dentries
authorYan, Zheng <zyan@redhat.com>
Mon, 15 Dec 2014 01:51:52 +0000 (09:51 +0800)
committerYan, Zheng <zyan@redhat.com>
Thu, 5 Feb 2015 14:40:39 +0000 (22:40 +0800)
now MDS use omap to store dirfrag, and always does partial commit.
marking dirfrag dirty after dropping stale dentries is useless.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/mds/CDir.cc

index 056b1af0826a7c136d5e8aa6ed544636b458c501..595f2d7e42a2d2a57e89f7adf0bceaeffa701ce6 100644 (file)
@@ -1586,7 +1586,6 @@ void CDir::_omap_fetched(bufferlist& hdrbl, map<string, bufferlist>& omap,
 
   // purge stale snaps?
   // only if we have past_parents open!
-  bool purged_any = false;
   const set<snapid_t> *snaps = NULL;
   SnapRealm *realm = inode->find_snaprealm();
   if (!realm->have_past_parents_open()) {
@@ -1627,7 +1626,6 @@ void CDir::_omap_fetched(bufferlist& hdrbl, map<string, bufferlist>& omap,
       if (p == snaps->end() || *p > last) {
        dout(10) << " skipping stale dentry on [" << first << "," << last << "]" << dendl;
        stale = true;
-       purged_any = true;
       }
     }
     
@@ -1787,9 +1785,6 @@ void CDir::_omap_fetched(bufferlist& hdrbl, map<string, bufferlist>& omap,
 
   //cache->mds->logger->inc("newin", num_new_inodes_loaded);
 
-  if (purged_any)
-    log_mark_dirty();
-
   // mark complete, !fetching
   mark_complete();
   state_clear(STATE_FETCHING);