]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: use weightf_t type when outputing weights by osd tree command
authorMykola Golub <mgolub@mirantis.com>
Thu, 15 Jan 2015 19:26:21 +0000 (21:26 +0200)
committerSage Weil <sage@redhat.com>
Sat, 17 Jan 2015 16:57:26 +0000 (08:57 -0800)
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
src/osd/OSDMap.cc

index bd7685b35420cd09fbbba941c418e830870a7138..2789bf5a64550339258319f547b308c642eb8864 100644 (file)
@@ -2467,7 +2467,7 @@ protected:
     std::streamsize p = out->precision();
 
     *out << qi.id << "\t"
-        << std::setprecision(4) << qi.weight << "\t";
+        << weightf_t(qi.weight) << "\t";
 
     for (int k=0; k < qi.depth; k++)
       *out << "\t";
@@ -2484,7 +2484,7 @@ protected:
        *out << "DNE\t\t";
       else
        *out << (osdmap->is_up(qi.id) ? "up" : "down") << "\t";
-      *out << (osdmap->exists(qi.id) ? osdmap->get_weightf(qi.id) : 0) << "\t"
+      *out << weightf_t(osdmap->exists(qi.id) ? osdmap->get_weightf(qi.id) : 0) << "\t"
           << (osdmap->exists(qi.id) ? osdmap->get_primary_affinityf(qi.id) : 0);
     }
     *out << std::setprecision(p) << "\n";