From: Sage Weil Date: Fri, 19 Nov 2010 21:58:31 +0000 (-0800) Subject: mds: resolve cleanup X-Git-Tag: v0.24~149 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cd53719f3ce712a060e4ac80cab934c597531a5e;p=ceph.git 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 --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 8a0597f7ed0c..f944c8724307 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(); }