From: Yan, Zheng Date: Thu, 14 Mar 2013 03:23:48 +0000 (+0800) Subject: mds: check MDS peer's state through mdsmap X-Git-Tag: v0.62~120^2~11 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4d532cb6d9ae8f44416f42d68ce0d2290ce5451c;p=ceph.git mds: check MDS peer's state through mdsmap Signed-off-by: Yan, Zheng Reviewed-by: Greg Farnum --- diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc index cf95d6ebb29..e1cb08f1da0 100644 --- a/src/mds/Migrator.cc +++ b/src/mds/Migrator.cc @@ -238,7 +238,7 @@ void Migrator::handle_mds_failure_or_stop(int who) export_unlock(dir); export_locks.erase(dir); dir->state_clear(CDir::STATE_EXPORTING); - if (export_peer[dir] != who) // tell them. + if (mds->mdsmap->is_clientreplay_or_active_or_stopping(export_peer[dir])) // tell them. mds->send_message_mds(new MExportDirCancel(dir->dirfrag()), export_peer[dir]); break; @@ -247,7 +247,7 @@ void Migrator::handle_mds_failure_or_stop(int who) dir->unfreeze_tree(); // cancel the freeze export_state.erase(dir); // clean up dir->state_clear(CDir::STATE_EXPORTING); - if (export_peer[dir] != who) // tell them. + if (mds->mdsmap->is_clientreplay_or_active_or_stopping(export_peer[dir])) // tell them. mds->send_message_mds(new MExportDirCancel(dir->dirfrag()), export_peer[dir]); break; @@ -278,7 +278,7 @@ void Migrator::handle_mds_failure_or_stop(int who) export_unlock(dir); export_locks.erase(dir); dir->state_clear(CDir::STATE_EXPORTING); - if (export_peer[dir] != who) // tell them. + if (mds->mdsmap->is_clientreplay_or_active_or_stopping(export_peer[dir])) // tell them. mds->send_message_mds(new MExportDirCancel(dir->dirfrag()), export_peer[dir]); break;