]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: remove dir from 'new' list on any commit, not just on clean
authorSage Weil <sage@newdream.net>
Thu, 1 Apr 2010 20:03:04 +0000 (13:03 -0700)
committerSage Weil <sage@newdream.net>
Thu, 1 Apr 2010 20:17:56 +0000 (13:17 -0700)
A dir may be redirtied after the commit, such that it never becomes clean.
It only needs to stay on the 'new' list until it's been written to disk
at least once, though.

src/mds/CDir.cc

index 45cfc7bf5a8ec5637717cf516c7ee34f2c67860d..635b24269885e2b86412f811477c3f59a4c7a2fd 100644 (file)
@@ -1669,6 +1669,9 @@ void CDir::_committed(version_t v, version_t lrv)
   // _all_ commits done?
   if (committing_version == committed_version) 
     state_clear(CDir::STATE_COMMITTING);
+
+  // _any_ commit, even if we've been redirtied, means we're no longer new.
+  item_new.remove_myself();
   
   // dir clean?
   if (committed_version == get_version())