From: Adam C. Emerson Date: Mon, 20 Nov 2017 21:11:00 +0000 (-0500) Subject: mon: Call get_json_str_map under wth_val X-Git-Tag: v13.0.2~802^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=777edc181d65678b9c9ca0dd0fd94465d3e5697b;p=ceph.git mon: Call get_json_str_map under wth_val To avoid temporary heap allocations. Signed-off-by: Adam C. Emerson --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 4ec000eac50f3..52c5afbb480ed 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -5457,9 +5457,11 @@ int OSDMonitor::parse_erasure_code_profile(const vector &erasure_code_pr map *erasure_code_profile_map, ostream *ss) { - int r = get_json_str_map(g_conf->get_val("osd_pool_default_erasure_code_profile"), - *ss, - erasure_code_profile_map); + int r = g_conf->with_val("osd_pool_default_erasure_code_profile", + get_json_str_map, + *ss, + erasure_code_profile_map, + true); if (r) return r; assert((*erasure_code_profile_map).count("plugin"));