]> 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)
committerAbhishek Varshney <abhishek.varshney@flipkart.com>
Fri, 6 May 2016 14:30:03 +0000 (20:00 +0530)
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit ec8f3db3e5c26b60b9333e86453e1b17324a8cfa)

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;
       }
     }
   }