From 4d56710ff3cc16c4867094b06731298381cdbf3d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 1 Apr 2010 13:03:04 -0700 Subject: [PATCH] mds: remove dir from 'new' list on any commit, not just on clean 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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mds/CDir.cc b/src/mds/CDir.cc index 45cfc7bf5a8ec..635b24269885e 100644 --- a/src/mds/CDir.cc +++ b/src/mds/CDir.cc @@ -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()) -- 2.39.5