From: Sage Weil Date: Mon, 2 Apr 2018 13:45:29 +0000 (-0500) Subject: osd: constify arg for handle_pg_create_info, maybe_wait_for_max_pg X-Git-Tag: v13.1.0~390^2~21 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=08381749f6f6424efd52377a699c749cc9d8b523;p=ceph.git osd: constify arg for handle_pg_create_info, maybe_wait_for_max_pg Signed-off-by: Sage Weil --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index fd6ac75aa464d..d4daac5a08523 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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("mon_max_pg_per_osd") * diff --git a/src/osd/OSD.h b/src/osd/OSD.h index 2023bbd68dcfe..36cdec86a7d53 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -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);