]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: omit fscid in single-filesystem status output
authorJohn Spray <john.spray@redhat.com>
Wed, 30 Mar 2016 11:05:43 +0000 (12:05 +0100)
committerJohn Spray <john.spray@redhat.com>
Tue, 3 May 2016 11:57:22 +0000 (12:57 +0100)
Signed-off-by: John Spray <john.spray@redhat.com>
src/mds/FSMap.cc

index c704c20e6871309abba39de3b3d7e995c3f903a8..531519626d839aef80ea1ad1461baa0e1a9d0f9d 100644 (file)
@@ -182,7 +182,12 @@ void FSMap::print_summary(Formatter *f, ostream *out)
         }
         *out << " " << pretty;
       } else {
-        *out << " " << by_rank;
+        // Omit FSCID in output when only one filesystem exists
+        std::map<mds_rank_t, std::string> shortened;
+        for (auto i : by_rank) {
+          shortened[i.first.rank] = i.second;
+        }
+        *out << " " << shortened;
       }
     }
   }