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: #1527 Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
4ac45200f1
commit
3153ec740d
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user