]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: swap instead of copy big query list
authorSage Weil <sage@newdream.net>
Fri, 16 May 2008 21:54:22 +0000 (14:54 -0700)
committerSage Weil <sage@newdream.net>
Fri, 16 May 2008 21:54:22 +0000 (14:54 -0700)
src/messages/MOSDPGQuery.h
src/osd/OSD.cc

index 870f41eae88e7056086175f6c6cc88aac854299a..5723e05a81eb62955e33cf1917a959c5491e4e98 100644 (file)
@@ -32,7 +32,8 @@ class MOSDPGQuery : public Message {
   MOSDPGQuery() {}
   MOSDPGQuery(epoch_t e, map<pg_t,PG::Query>& ls) :
     Message(MSG_OSD_PG_QUERY),
-    epoch(e), pg_list(ls) {
+    epoch(e) {
+    pg_list.swap(ls);
   }
   
   const char *get_type_name() { return "PGq"; }
index 7874071e33e28de276b6b4fd02a61bdcb9024818..d1341a00e60ce76173e2a49020dc97eea989ace7 100644 (file)
@@ -2245,7 +2245,6 @@ void OSD::handle_pg_notify(MOSDPGNotify *m)
  * NOTE: called with opqueue active.
  */
 
-
 void OSD::_process_pg_info(epoch_t epoch, int from,
                           PG::Info &info, 
                           PG::Log &log,