From: Sage Weil Date: Fri, 26 Feb 2021 01:58:27 +0000 (-0600) Subject: mon/PGMap: include the per-pool usage breakdown in pg dump X-Git-Tag: v16.2.0~146^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bdf75d5d4d759967485d3b30ae406a7e3756766f;p=ceph.git mon/PGMap: include the per-pool usage breakdown in pg dump We started accounting for this ages ago, but we don't expose it anywhere. Signed-off-by: Sage Weil (cherry picked from commit 82aeb07f9d47fbc990dbecaf34c44812dc6ceb1e) --- diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index 4b8a79c0bdf6..6b4a1935e51d 100644 --- a/src/mon/PGMap.cc +++ b/src/mon/PGMap.cc @@ -1621,6 +1621,16 @@ void PGMap::dump_osd_stats(ceph::Formatter *f, bool with_net) const f->close_section(); } f->close_section(); + + f->open_array_section("pool_statfs"); + for (auto& p : pool_statfs) { + f->open_object_section("item"); + f->dump_int("poolid", p.first.first); + f->dump_int("osd", p.first.second); + p.second.dump(f); + f->close_section(); + } + f->close_section(); } void PGMap::dump_osd_ping_times(ceph::Formatter *f) const