From: Sage Weil Date: Sun, 21 Oct 2012 21:22:51 +0000 (-0700) Subject: mds: fix handling of cache_expire export X-Git-Tag: v0.55~201^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3153ec740d6ba6f0545128b16b0fa037a23f9d12;p=ceph.git mds: fix handling of cache_expire export During export, between the warning stage and the final notify, we may get cache expire messages because the replicas are sending to both us and the new auth. This check should look for >= WARNING so that it includes the EXPORTING states as well as the portion of WARNING after we heard from that replica. This aligns the conditional with the following assert such that they are properly mutually exclusive. Fixes: #1527 Signed-off-by: Sage Weil --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 8598f46dba57..00a21586bac6 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -5913,14 +5913,14 @@ void MDCache::handle_cache_expire(MCacheExpire *m) if (!parent_dir->is_auth() || (parent_dir->is_auth() && parent_dir->is_exporting() && - // this person has acked that we're exporting - migrator->get_export_state(parent_dir) == Migrator::EXPORT_WARNING && - migrator->export_has_warned(parent_dir,from))) { + ((migrator->get_export_state(parent_dir) == Migrator::EXPORT_WARNING && + migrator->export_has_warned(parent_dir,from)) || + migrator->get_export_state(parent_dir) == Migrator::EXPORT_EXPORTING))) { // not auth. dout(7) << "delaying nonauth|warned expires for " << *parent_dir << dendl; assert(parent_dir->is_frozen_tree_root()); - // make a message parent_dirtainer + // make a message container if (delayed_expire[parent_dir].count(from) == 0) delayed_expire[parent_dir][from] = new MCacheExpire(from);