From cd53719f3ce712a060e4ac80cab934c597531a5e Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 19 Nov 2010 13:58:31 -0800 Subject: [PATCH] mds: resolve cleanup Only track ambiguous imports and such if we get a resolve message while in the resolve state. Signed-off-by: Sage Weil --- src/mds/MDCache.cc | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 8a0597f7ed0c8..f944c87243078 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -2503,19 +2503,20 @@ void MDCache::handle_resolve(MMDSResolve *m) show_subtrees(); - - // note ambiguous imports too - for (map >::iterator pi = m->ambiguous_imports.begin(); - pi != m->ambiguous_imports.end(); - ++pi) { - dout(10) << "noting ambiguous import on " << pi->first << " bounds " << pi->second << dendl; - other_ambiguous_imports[from][pi->first].swap( pi->second ); - } - - // did i get them all? - got_resolve.insert(from); + if (mds->is_resolve()) { + // note ambiguous imports too + for (map >::iterator pi = m->ambiguous_imports.begin(); + pi != m->ambiguous_imports.end(); + ++pi) { + dout(10) << "noting ambiguous import on " << pi->first << " bounds " << pi->second << dendl; + other_ambiguous_imports[from][pi->first].swap( pi->second ); + } + + // did i get them all? + got_resolve.insert(from); - maybe_resolve_finish(); + maybe_resolve_finish(); + } m->put(); } -- 2.39.5