From: Sage Weil Date: Thu, 5 Jun 2008 20:53:26 +0000 (-0700) Subject: mds: clean up old mtime cruft, bug X-Git-Tag: v0.3~159 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=69324abe39c4f20827fd19e980161a1fbf42b391;p=ceph.git mds: clean up old mtime cruft, bug --- diff --git a/src/mds/CInode.cc b/src/mds/CInode.cc index f85fa20770c1..e9481327a9d4 100644 --- a/src/mds/CInode.cc +++ b/src/mds/CInode.cc @@ -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); diff --git a/src/mds/events/EMetaBlob.h b/src/mds/events/EMetaBlob.h index 1930d01e9a9c..08c648b69574 100644 --- a/src/mds/events/EMetaBlob.h +++ b/src/mds/events/EMetaBlob.h @@ -245,9 +245,6 @@ private: // anchor transactions included in this update. list atids; - // inode dirlocks (scatterlocks) i've touched. - //map dirty_inode_mtimes; - // ino's i've allocated list 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; diff --git a/src/mds/journal.cc b/src/mds/journal.cc index e8052d4ffca5..d75faec618c5 100644 --- a/src/mds/journal.cc +++ b/src/mds/journal.cc @@ -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::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) {