From fa7b0a5bc7f586a1cae2d3abea3bcf820f399976 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 3 Jun 2009 16:10:28 -0700 Subject: [PATCH] mds: keep only one dir commit in flight Ordering is not guaranteed, so putting multiple commits in flight is not safe.. the osd may commit the older data on top of the new. --- src/mds/CDir.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mds/CDir.cc b/src/mds/CDir.cc index f8c1efb152719..d509313cccb76 100644 --- a/src/mds/CDir.cc +++ b/src/mds/CDir.cc @@ -1355,6 +1355,12 @@ void CDir::_commit(version_t want) assert(state_test(STATE_COMMITTING)); return; } + + // alrady committed an older version? + if (committing_version > committed_version) { + dout(10) << "already committing older " << committing_version << ", waiting for that to complete" << dendl; + return; + } // complete? if (!is_complete()) { -- 2.39.5