mirror of
https://github.com/ceph/ceph
synced 2025-02-23 19:17:37 +00:00
mon: Call get_json_str_map under wth_val
To avoid temporary heap allocations. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
This commit is contained in:
parent
8dafb23516
commit
777edc181d
@ -5457,9 +5457,11 @@ int OSDMonitor::parse_erasure_code_profile(const vector<string> &erasure_code_pr
|
||||
map<string,string> *erasure_code_profile_map,
|
||||
ostream *ss)
|
||||
{
|
||||
int r = get_json_str_map(g_conf->get_val<string>("osd_pool_default_erasure_code_profile"),
|
||||
*ss,
|
||||
erasure_code_profile_map);
|
||||
int r = g_conf->with_val<string>("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"));
|
||||
|
Loading…
Reference in New Issue
Block a user