]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: constify a bit
authorSage Weil <sage@redhat.com>
Thu, 16 Feb 2017 22:56:57 +0000 (17:56 -0500)
committerSage Weil <sage@redhat.com>
Mon, 20 Feb 2017 19:13:04 +0000 (14:13 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc
src/osd/OSD.h
src/osd/PG.cc
src/osd/PG.h

index 6953861138624bc4c5f958b78d965e1b7f5f9232..fc756168567780d866438241e4fc8792187e5c87 100644 (file)
@@ -3281,7 +3281,7 @@ PG *OSD::_create_lock_pg(
   vector<int>& up, int up_primary,
   vector<int>& acting, int acting_primary,
   pg_history_t history,
-  pg_interval_map_t& pi,
+  const pg_interval_map_t& pi,
   ObjectStore::Transaction& t)
 {
   assert(osd_lock.is_locked());
@@ -3669,7 +3669,7 @@ void OSD::build_past_intervals_parallel()
 void OSD::handle_pg_peering_evt(
   spg_t pgid,
   const pg_history_t& orig_history,
-  pg_interval_map_t& pi,
+  const pg_interval_map_t& pi,
   epoch_t epoch,
   PG::CephPeeringEvtRef evt)
 {
index 4b6755da95600063e1065eb0e183b3177a4ca665..6d2de7ce634404a111bcaa577e597ae01348eb37 100644 (file)
@@ -2063,7 +2063,7 @@ protected:
     vector<int>& up, int up_primary,
     vector<int>& acting, int acting_primary,
     pg_history_t history,
-    pg_interval_map_t& pi,
+    const pg_interval_map_t& pi,
     ObjectStore::Transaction& t);
   PG   *_lookup_qlock_pg(spg_t pgid);
 
@@ -2074,7 +2074,7 @@ protected:
   void handle_pg_peering_evt(
     spg_t pgid,
     const pg_history_t& orig_history,
-    pg_interval_map_t& pi,
+    const pg_interval_map_t& pi,
     epoch_t epoch,
     PG::CephPeeringEvtRef evt);
   
index c47dac0b6495a0a67058a591f758ae82a2700714..c70ad9f5d58cdea8faae51e5cb8653129a5e1c4d 100644 (file)
@@ -2796,7 +2796,7 @@ void PG::init(
   const vector<int>& newup, int new_up_primary,
   const vector<int>& newacting, int new_acting_primary,
   const pg_history_t& history,
-  pg_interval_map_t& pi,
+  const pg_interval_map_t& pi,
   bool backfill,
   ObjectStore::Transaction *t)
 {
@@ -2815,7 +2815,7 @@ void PG::init(
     new_acting_primary);
 
   info.history = history;
-  past_intervals.swap(pi);
+  past_intervals = pi;
 
   info.stats.up = up;
   info.stats.up_primary = new_up_primary;
index 1944bbc1bcccb3f82bdc0fae973bd9aaeda44a79..74aa9631af1e875d3a9959dfde42a11c4f186abb 100644 (file)
@@ -2180,7 +2180,7 @@ public:
     const vector<int>& acting,
     int acting_primary,
     const pg_history_t& history,
-    pg_interval_map_t& pim,
+    const pg_interval_map_t& pim,
     bool backfill,
     ObjectStore::Transaction *t);