]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: osd tree to show primary-affinity value 3254/head
authorMykola Golub <mgolub@mirantis.com>
Wed, 24 Dec 2014 08:22:59 +0000 (10:22 +0200)
committerMykola Golub <mgolub@mirantis.com>
Thu, 25 Dec 2014 12:42:21 +0000 (14:42 +0200)
Fixes: #10036
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
src/osd/OSDMap.cc

index 864d5542f8af1299ff3ca51b6651cc5fb6bae9e6..5a9370802f4a7ab2f2536709c82a2e713fe6a07e 100644 (file)
@@ -2477,9 +2477,13 @@ void OSDMap::print_osd_line(int cur, ostream *out, Formatter *f) const
           << (exists(cur) ? get_weightf(cur) : 0)
           << std::setprecision(p)
           << "\t";
+      *out << std::setprecision(4)
+          << (exists(cur) ? get_primary_affinityf(cur) : 0)
+          << std::setprecision(p);
     }
     if (f) {
       f->dump_float("reweight", get_weightf(cur));
+      f->dump_float("primary_affinity", get_primary_affinityf(cur));
     }
   }
 }
@@ -2487,7 +2491,7 @@ void OSDMap::print_osd_line(int cur, ostream *out, Formatter *f) const
 void OSDMap::print_tree(ostream *out, Formatter *f) const
 {
   if (out)
-    *out << "# id\tweight\ttype name\tup/down\treweight\n";
+    *out << "# id\tweight\ttype name\tup/down\treweight\tprimary-affinity\n";
   if (f)
     f->open_array_section("nodes");
   set<int> touched;