]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: remove failed MDS from export bystanders list
authorYan, Zheng <zheng.z.yan@intel.com>
Tue, 28 Jan 2014 04:17:24 +0000 (12:17 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Mon, 17 Feb 2014 01:37:51 +0000 (09:37 +0800)
make sure the importer does not wait for MExportDirNotifyAck from
the failed MDS

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/mds/Migrator.cc

index 036d9be1da3ab0f4e09aa060f287f3de9bd32cac..233a5116410a094ea35648d3bcce9026e2375fc0 100644 (file)
@@ -511,15 +511,16 @@ void Migrator::handle_mds_failure_or_stop(int who)
        break;
       }
     } else {
-      if (q->second.state == IMPORT_ABORTING &&
-         q->second.bystanders.count(who)) {
-       assert(dir);
-       dout(10) << "faking export_notify_ack from mds." << who
-                << " on aborting import " << *dir << " from mds." << q->second.peer
-                << dendl;
+      if (q->second.bystanders.count(who)) {
        q->second.bystanders.erase(who);
-       if (q->second.bystanders.empty()) {
-         import_reverse_unfreeze(dir);
+       if (q->second.state == IMPORT_ABORTING) {
+         assert(dir);
+         dout(10) << "faking export_notify_ack from mds." << who
+                  << " on aborting import " << *dir << " from mds." << q->second.peer
+                  << dendl;
+         if (q->second.bystanders.empty()) {
+           import_reverse_unfreeze(dir);
+         }
        }
       }
     }