]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: dump percent_used PGMap field as float 20439/head
authorJohn Spray <john.spray@redhat.com>
Wed, 14 Feb 2018 15:19:54 +0000 (15:19 +0000)
committerJohn Spray <john.spray@redhat.com>
Wed, 14 Feb 2018 15:19:54 +0000 (15:19 +0000)
Formatting this as a string was awkward for anyone
consuming it from other code.

Signed-off-by: John Spray <john.spray@redhat.com>
src/mon/PGMap.cc

index 0876abede7bcf6d8b99d29c33a765d76796d0a0d..188eb97eb067faa58d9e395eae0d2a4f9c119419 100644 (file)
@@ -877,7 +877,7 @@ void PGMapDigest::dump_object_stat_sum(
   if (f) {
     f->dump_int("kb_used", shift_round_up(sum.num_bytes, 10));
     f->dump_int("bytes_used", sum.num_bytes);
-    f->dump_format_unquoted("percent_used", "%.2f", (used*100));
+    f->dump_float("percent_used", used);
     f->dump_unsigned("max_avail", avail / raw_used_rate);
     f->dump_int("objects", sum.num_objects);
     if (verbose) {