From 718faf0e6999eb2218b17ca712f5af922d0fed7f Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 14 Apr 2015 09:35:04 -0700 Subject: [PATCH] mon: make note about osd df calc bug Signed-off-by: Sage Weil --- src/mon/OSDMonitor.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 5c5ecaed58a6..7d8513b7df08 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -625,6 +625,11 @@ public: max_var(-1), stddev(0), sum(0) { + // FIXME: average_util should be calculated from the same set of + // nodes that dump_item considers when calculating the stddev. we + // probably need to make two tree traversals for that to work, + // maybe with a callback like precalc_item() that's looks similar + // to dump_item()? if (pgm->osd_sum.kb) average_util = 100.0 * (double)pgm->osd_sum.kb_used / (double)pgm->osd_sum.kb; } -- 2.47.3