if (dir->authority() != me_ambig) {
dout(10) << "ambiguous import auth known, must not be me " << *dir << dendl;
cancel_ambiguous_import(dir);
+
+ // subtree may have been swallowed by another node claiming dir
+ // as their own.
+ CDir *root = get_subtree_root(dir);
+ if (root != dir)
+ dout(10) << " subtree root is " << *root << dendl;
+ assert(root->dir_auth.first != mds->whoami); // no us!
+ try_trim_non_auth_subtree(root);
+
mds->mdlog->start_submit_entry(new EImportFinish(dir, false));
} else {
dout(10) << "ambiguous import auth unclaimed, must be me " << *dir << dendl;
<< " " << *dir
<< dendl;
my_ambiguous_imports.erase(df);
-
- try_trim_non_auth_subtree(dir);
}
void MDCache::finish_ambiguous_import(dirfrag_t df)
mds->mdcache->get_ambiguous_import_bounds(base, bounds);
mds->mdcache->adjust_bounded_subtree_auth(dir, bounds, pair<int,int>(CDIR_AUTH_UNKNOWN, CDIR_AUTH_UNKNOWN));
mds->mdcache->cancel_ambiguous_import(dir);
- }
+ mds->mdcache->try_trim_non_auth_subtree(dir);
+ }
} else {
dout(10) << "EImportFinish.replay " << base << " success=" << success
<< " on subtree not marked as ambiguous"