]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: set osd up_thru when adjusting pg_temp
authorSage Weil <sage@newdream.net>
Tue, 6 Apr 2010 20:25:32 +0000 (13:25 -0700)
committerSage Weil <sage@newdream.net>
Tue, 6 Apr 2010 20:30:12 +0000 (13:30 -0700)
This just avoids making the OSD ask again for up_thru.  Fewer osdmap
updates!

src/mon/OSDMonitor.cc

index 6dd03f010721098098bf3b17b0f1d3e78bcd401f..ecc98837d80e759d1a51c312d6165e9f8a9af7b3 100644 (file)
@@ -582,9 +582,11 @@ bool OSDMonitor::preprocess_pgtemp(MOSDPGTemp *m)
 
 bool OSDMonitor::prepare_pgtemp(MOSDPGTemp *m)
 {
+  int from = m->get_orig_source().num();
   dout(7) << "prepare_pgtemp e" << m->map_epoch << " from " << m->get_orig_source_inst() << dendl;
   for (map<pg_t,vector<int> >::iterator p = m->pg_temp.begin(); p != m->pg_temp.end(); p++)
     pending_inc.new_pg_temp[p->first] = p->second;
+  pending_inc.new_up_thru[from] = m->map_epoch;   // set up_thru too, so the osd doesn't have to ask again
   paxos->wait_for_commit(new C_ReplyMap(this, m, m->map_epoch));
   return true;
 }