]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: constify arg for handle_pg_create_info, maybe_wait_for_max_pg
authorSage Weil <sage@redhat.com>
Mon, 2 Apr 2018 13:45:29 +0000 (08:45 -0500)
committerSage Weil <sage@redhat.com>
Wed, 4 Apr 2018 13:26:59 +0000 (08:26 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc
src/osd/OSD.h

index fd6ac75aa464d499c67dbe047ac418b3a7f6ad67..d4daac5a0852303e72ff069648011677c089c55a 100644 (file)
@@ -3888,7 +3888,8 @@ void OSD::load_pgs()
 }
 
 
-PGRef OSD::handle_pg_create_info(OSDMapRef osdmap, const PGCreateInfo *info)
+PGRef OSD::handle_pg_create_info(const OSDMapRef& osdmap,
+                                const PGCreateInfo *info)
 {
   spg_t pgid = info->pgid;
 
@@ -3949,7 +3950,9 @@ PGRef OSD::handle_pg_create_info(OSDMapRef osdmap, const PGCreateInfo *info)
   return pg;
 }
 
-bool OSD::maybe_wait_for_max_pg(OSDMapRef osdmap, spg_t pgid, bool is_mon_create)
+bool OSD::maybe_wait_for_max_pg(const OSDMapRef& osdmap,
+                               spg_t pgid,
+                               bool is_mon_create)
 {
   const auto max_pgs_per_osd =
     (cct->_conf->get_val<uint64_t>("mon_max_pg_per_osd") *
index 2023bbd68dcfe9589336fc2f087d1b0563419f3b..36cdec86a7d535dfc8f4d0185ffa2736f9d00204 100644 (file)
@@ -1883,7 +1883,8 @@ public:
 protected:
   PG* _make_pg(OSDMapRef createmap, spg_t pgid);
 
-  bool maybe_wait_for_max_pg(OSDMapRef osdmap, spg_t pgid, bool is_mon_create);
+  bool maybe_wait_for_max_pg(const OSDMapRef& osdmap,
+                            spg_t pgid, bool is_mon_create);
   void resume_creating_pg();
 
   void load_pgs();
@@ -2018,7 +2019,7 @@ protected:
   void handle_fast_pg_info(MOSDPGInfo *m);
   void handle_fast_pg_remove(MOSDPGRemove *m);
 
-  PGRef handle_pg_create_info(OSDMapRef osdmap, const PGCreateInfo *info);
+  PGRef handle_pg_create_info(const OSDMapRef& osdmap, const PGCreateInfo *info);
 
   void handle_fast_force_recovery(MOSDForceRecovery *m);