From 82aeb07f9d47fbc990dbecaf34c44812dc6ceb1e Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 25 Feb 2021 19:58:27 -0600 Subject: [PATCH] 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 --- src/mon/PGMap.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index 4b8a79c0bdf..6b4a1935e51 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 -- 2.39.5