#undef dout_prefix
#define dout_prefix *_dout << dbeginl << "mds" << mds->get_nodeid() << ".migrator "
-
+/* This function DOES put the passed message before returning*/
void Migrator::dispatch(Message *m)
{
switch (m->get_type()) {
/*
* called on receipt of MExportDirDiscoverAck
* the importer now has the directory's _inode_ in memory, and pinned.
+ *
+ * This function DOES put the passed message before returning
*/
void Migrator::handle_export_discover_ack(MExportDirDiscoverAck *m)
{
assert (g_conf.mds_kill_export_at != 4);
}
+/* This function DOES put the passed message before returning*/
void Migrator::handle_export_prep_ack(MExportDirPrepAck *m)
{
CDir *dir = cache->get_dirfrag(m->get_dirfrag());
/*
* i should get an export_ack from the export target.
+ *
+ * This function DOES put the passed message before returning
*/
void Migrator::handle_export_ack(MExportDirAck *m)
{
* notify:
* i'll get an ack from each bystander.
* when i get them all, unfreeze and send the finish.
+ *
+ * This function DOES put the passed message before returning
*/
void Migrator::handle_export_notify_ack(MExportDirNotifyAck *m)
{
filepath fpath(m->get_path());
vector<CDentry*> trace;
int r = cache->path_traverse(0, m, fpath, &trace, NULL, MDS_TRAVERSE_DISCOVER);
- if (r > 0) return; // wait
+ if (r > 0) return;
if (r < 0) {
dout(7) << "handle_export_discover_2 failed to discover or not dir " << m->get_path() << ", NAK" << dendl;
assert(0); // this shouldn't happen if the auth pins his path properly!!!!
// reply
dout(7) << " sending export_discover_ack on " << *in << dendl;
mds->send_message_mds(new MExportDirDiscoverAck(df), import_peer[df]);
+ m->put();
assert (g_conf.mds_kill_import_at != 2);
}
+/* This function DOES put the passed message before returning*/
void Migrator::handle_export_cancel(MExportDirCancel *m)
{
dout(7) << "handle_export_cancel on " << m->get_dirfrag() << dendl;
m->put();
}
-
+/* This function DOES put the passed message before returning*/
void Migrator::handle_export_prep(MExportDirPrep *m)
{
int oldauth = m->get_source().num();
}
};
+/* This function DOES put the passed message before returning*/
void Migrator::handle_export_dir(MExportDir *m)
{
assert (g_conf.mds_kill_import_at != 5);
cache->show_subtrees();
}
-
+/* This function DOES put the passed message before returning*/
void Migrator::handle_export_finish(MExportDirFinish *m)
{
CDir *dir = cache->get_dirfrag(m->get_dirfrag());
// authority bystander
+/* This function DOES put the passed message before returning*/
void Migrator::handle_export_notify(MExportDirNotify *m)
{
CDir *dir = cache->get_dirfrag(m->get_dirfrag());
mds->send_message_mds(ex, dest);
}
+/* This function DOES put the passed message before returning*/
void Migrator::handle_export_caps_ack(MExportCapsAck *ack)
{
CInode *in = cache->get_inode(ack->ino);
}
};
+/* This function DOES put the passed message before returning*/
void Migrator::handle_export_caps(MExportCaps *ex)
{
dout(10) << "handle_export_caps " << *ex << " from " << ex->get_source() << dendl;