]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: handle_export_caps, copy cap_import map (instead of swap content)
authorYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 22 Jun 2010 21:11:53 +0000 (14:11 -0700)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 22 Jun 2010 21:11:53 +0000 (14:11 -0700)
This fixes #200. The client_map is later on swapped again in the new ESession(),
which left finish->client_map empty.

src/mds/Migrator.cc

index 95bee5099ed27d79ae0c28f9a6677db88893cd56..9b325c8e122e99dbefec502ba6ee6b3fbcd1f9aa 100644 (file)
@@ -2334,7 +2334,7 @@ void Migrator::handle_export_caps(MExportCaps *ex)
    */
 
   C_M_LoggedImportCaps *finish = new C_M_LoggedImportCaps(this, in, ex->get_source().num());
-  finish->client_map.swap(ex->client_map);
+  finish->client_map = ex->client_map;
 
   // decode new caps
   bufferlist::iterator blp = ex->cap_bl.begin();
@@ -2344,7 +2344,7 @@ void Migrator::handle_export_caps(MExportCaps *ex)
   // journal open client sessions
   version_t pv = mds->server->prepare_force_open_sessions(finish->client_map, finish->sseqmap);
   
-  ESessions *le = new ESessions(pv, finish->client_map);
+  ESessions *le = new ESessions(pv, ex->client_map);
   mds->mdlog->start_entry(le);
   mds->mdlog->submit_entry(le);
   mds->mdlog->wait_for_safe(finish);