]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: clean up old mtime cruft, bug
authorSage Weil <sage@newdream.net>
Thu, 5 Jun 2008 20:53:26 +0000 (13:53 -0700)
committerSage Weil <sage@newdream.net>
Thu, 5 Jun 2008 20:53:26 +0000 (13:53 -0700)
src/mds/CInode.cc
src/mds/events/EMetaBlob.h
src/mds/journal.cc

index f85fa20770c1edb93c9ad5cedafebd2afad7a877..e9481327a9d4b83536c5a6f7e49ef75c64a595ee 100644 (file)
@@ -945,15 +945,10 @@ void CInode::finish_export(utime_t now)
 void CInode::decode_import(bufferlist::iterator& p,
                           LogSegment *ls)
 {
-  utime_t old_mtime = inode.mtime;
   bool was_anchored = inode.anchored;
   ::decode(inode, p);
   if (parent && was_anchored != inode.anchored)
     parent->adjust_nested_anchors((int)inode.anchored - (int)was_anchored);
-  if (old_mtime > inode.mtime) {
-    assert(dirlock.is_updated());
-    inode.mtime = old_mtime;     // preserve our mtime, if it is larger
-  }
 
   ::decode(symlink, p);
   ::decode(dirfragtree, p);
index 1930d01e9a9c5c20f8b553d4fb8e4cefed30baba..08c648b69574714f9b89217f348b42db833478a6 100644 (file)
@@ -245,9 +245,6 @@ private:
   // anchor transactions included in this update.
   list<version_t>         atids;
 
-  // inode dirlocks (scatterlocks) i've touched.
-  //map<inodeno_t, utime_t> dirty_inode_mtimes;
-
   // ino's i've allocated
   list<inodeno_t> allocated_inos;
   version_t alloc_tablev;
@@ -263,7 +260,6 @@ private:
     ::encode(lump_order, bl);
     ::encode(lump_map, bl);
     ::encode(atids, bl);
-    //::encode(dirty_inode_mtimes, bl);
     ::encode(allocated_inos, bl);
     if (!allocated_inos.empty())
       ::encode(alloc_tablev, bl);
@@ -274,7 +270,6 @@ private:
     ::decode(lump_order, bl);
     ::decode(lump_map, bl);
     ::decode(atids, bl);
-    //::decode(dirty_inode_mtimes, bl);
     ::decode(allocated_inos, bl);
     if (!allocated_inos.empty())
       ::decode(alloc_tablev, bl);
@@ -309,12 +304,6 @@ private:
     atids.push_back(atid);
   }  
 
-  /*
-  void add_dirtied_inode_mtime(inodeno_t ino, utime_t ctime) {
-    dirty_inode_mtimes[ino] = ctime;
-  }
-  */
-
   void add_allocated_ino(inodeno_t ino, version_t tablev) {
     allocated_inos.push_back(ino);
     alloc_tablev = tablev;
index e8052d4ffca5389fd4d5481314808d41d3ebe891..d75faec618c58e9e1c704d6ae97c63be1987730e 100644 (file)
@@ -413,18 +413,6 @@ void EMetaBlob::replay(MDS *mds, LogSegment *logseg)
     mds->anchorclient->got_journaled_agree(*p, logseg);
   }
 
-  /*// dirtied inode mtimes
-  if (!dirty_inode_mtimes.empty())
-    for (map<inodeno_t,utime_t>::iterator p = dirty_inode_mtimes.begin();
-        p != dirty_inode_mtimes.end();
-        ++p) {
-      CInode *in = mds->mdcache->get_inode(p->first);
-      dout(10) << "EMetaBlob.replay setting dirlock updated flag on " << *in << dendl;
-      in->dirlock.set_updated();
-      logseg->dirty_inode_mtimes.push_back(&in->xlist_dirty_inode_mtime);
-    }
-  */
-
   // allocated_inos
   if (!allocated_inos.empty()) {
     if (mds->idalloc->get_version() >= alloc_tablev) {