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
+3: After recieving MExportDirDiscoverAck and auth_unpin'ing.
+4: After sending MExportDirPrep
+5: After receiving MExportDirPrepAck
+6: After sending out MExportDirNotify to all replicas
+7: After switching to state EXPORT_EXPORTING
+ (all replicas have acked ExportDirNotify)
+8: After sending MExportDir to recipient
+9: After receipt of MExportAck (new state: EXPORT_LOGGINGFINISH)
+10: After logging EExport to journal
+11: After sending out MExportDirNotify (new state: EXPORT_NOTIFYING)
+12: After receiving MExportDirNotifyAck from all bystanders
+13: After sending MExportDirFinish to importer
// send.
export_state[dir] = EXPORT_PREPPING;
mds->send_message_mds(prep, dest);
+ assert (mds_kill_export_at != 4);
}
void Migrator::handle_export_prep_ack(MExportDirPrepAck *m)
return;
}
+ assert (mds_kill_export_at != 5);
// send warnings
int dest = export_peer[dir];
set<CDir*> bounds;
}
export_state[dir] = EXPORT_WARNING;
+ assert(mds_kill_export_at != 6);
// nobody to warn?
if (export_warning_ack_waiting.count(dir) == 0)
export_go(dir); // start export.
export_warning_ack_waiting.erase(dir);
export_state[dir] = EXPORT_EXPORTING;
+ assert(kill_mds_export_at != 7);
assert(dir->get_cum_auth_pins() == 0);
// send
mds->send_message_mds(req, dest);
+ assert(kill_mds_export_at != 8);
// stats
if (mds->logger) mds->logger->inc(l_mds_ex);
export_warning_ack_waiting.erase(dir);
export_state[dir] = EXPORT_LOGGINGFINISH;
-
+ assert (mds_kill_export_at != 9);
set<CDir*> bounds;
cache->get_subtree_bounds(dir, bounds);
mds->mdlog->submit_entry(le);
mds->mdlog->wait_for_safe(new C_MDS_ExportFinishLogged(this, dir));
mds->mdlog->flush();
+ assert (mds_kill_export_at != 10);
delete m;
}
// wait for notifyacks
export_state[dir] = EXPORT_NOTIFYING;
+ assert (mds_kill_export_at != 11);
// no notifies to wait for?
if (export_notify_ack_waiting[dir].empty())
{
dout(5) << "export_finish " << *dir << dendl;
+ assert (mds_kill_export_at != 12);
if (export_state.count(dir) == 0) {
dout(7) << "target must have failed, not sending final commit message. export succeeded anyway." << dendl;
return;
} else {
dout(7) << "not sending MExportDirFinish, dest has failed" << dendl;
}
+ assert(mds_kill_export_at != 13);
// finish export (adjust local cache state)
C_Contexts *fin = new C_Contexts;