]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: Add mds_kill_export_at asserts.
authorGreg Farnum <gregf@hq.newdream.net>
Thu, 3 Dec 2009 01:37:34 +0000 (17:37 -0800)
committerGreg Farnum <gregf@hq.newdream.net>
Thu, 3 Dec 2009 21:43:43 +0000 (13:43 -0800)
Create and begin documenting doc/killpoints.txt

src/doc/killpoints.txt [new file with mode: 0644]
src/mds/Migrator.cc

diff --git a/src/doc/killpoints.txt b/src/doc/killpoints.txt
new file mode 100644 (file)
index 0000000..1d83295
--- /dev/null
@@ -0,0 +1,9 @@
+Kill arguments in code:
+mds_kill_mdstable_at
+mds_kill_export_at
+mds_kill_import_at
+
+mds_kill_export_at:
+1: After moving to STATE_EXPORTING
+2: After sending MExportDirDiscover
+3: After recieving MExportDirDiscoverAck and auth_unpin'ing.
\ No newline at end of file
index 6ed4d1f868b9a514bffb7cc1a690fafcc2504862..62fa0545ce78ebdba01b1104a2ae8431988a7e25 100644 (file)
@@ -598,11 +598,13 @@ void Migrator::export_dir(CDir *dir, int dest)
   export_peer[dir] = dest;
 
   dir->state_set(CDir::STATE_EXPORTING);
+  assert(mds_kill_export_at != 1);
 
   // send ExportDirDiscover (ask target)
   filepath path;
   dir->inode->make_path(path);
   mds->send_message_mds(new MExportDirDiscover(path, dir->dirfrag()), dest);
+  assert(mds_kill_export_at != 2);
 
   // start the freeze, but hold it up with an auth_pin.
   dir->auth_pin(this);
@@ -632,6 +634,7 @@ void Migrator::handle_export_discover_ack(MExportDirDiscoverAck *m)
     // freeze the subtree
     export_state[dir] = EXPORT_FREEZING;
     dir->auth_unpin(this);
+    assert(mds_kill_export_at != 3);
   }
   
   delete m;  // done