From: Greg Farnum Date: Fri, 5 May 2017 04:42:24 +0000 (-0700) Subject: mon: give PGStatService a process_pg_command indirection X-Git-Tag: ses5-milestone6~8^2~19^2~113 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a6e669c4d57acd4a264d67a18eedbdcef57fed4b;p=ceph.git mon: give PGStatService a process_pg_command indirection Signed-off-by: Greg Farnum --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index f79217b53d04..1a2c1907125b 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -3960,8 +3960,8 @@ bool OSDMonitor::preprocess_command(MonOpRequestRef op) } else if (prefix == "osd perf" || prefix == "osd blocked-by") { - r = process_pg_map_command(prefix, cmdmap, mon->pgservice->get_pg_map(), - osdmap, f.get(), &ss, &rdata); + r = mon->pgservice->process_pg_command(prefix, cmdmap, + osdmap, f.get(), &ss, &rdata); } else if (prefix == "osd dump" || prefix == "osd tree" || @@ -4851,8 +4851,8 @@ bool OSDMonitor::preprocess_command(MonOpRequestRef op) } r = 0; } else if (prefix == "osd pool stats") { - r = process_pg_map_command(prefix, cmdmap, mon->pgservice->get_pg_map(), - osdmap, f.get(), &ss, &rdata); + r = mon->pgservice->process_pg_command(prefix, cmdmap, + osdmap, f.get(), &ss, &rdata); } else if (prefix == "osd pool get-quota") { string pool_name; cmd_getval(g_ceph_context, cmdmap, "pool", pool_name); diff --git a/src/mon/PGStatService.h b/src/mon/PGStatService.h index 656b44cbc9fa..b6a64457e51c 100644 --- a/src/mon/PGStatService.h +++ b/src/mon/PGStatService.h @@ -96,6 +96,15 @@ public: bool verbose) const { parent.dump_pool_stats(osdm, ss, f, verbose); } + + int process_pg_command(const string& prefix, + const map& cmdmap, + const OSDMap& osdmap, + Formatter *f, + stringstream *ss, + bufferlist *odata) { + return process_pg_map_command(prefix, cmdmap, parent, osdmap, f, ss, odata); + } };