1
0
mirror of https://github.com/ceph/ceph synced 2024-12-20 02:13:04 +00:00

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: 
Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Sage Weil 2012-10-21 14:22:51 -07:00
parent 4ac45200f1
commit 3153ec740d

View File

@ -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);