]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cephfs: Always print filesystem name
authorDouglas Fuller <dfuller@redhat.com>
Mon, 24 Jul 2017 17:29:55 +0000 (12:29 -0500)
committerDouglas Fuller <dfuller@redhat.com>
Thu, 3 Aug 2017 21:44:44 +0000 (17:44 -0400)
Previously, the FSMap summary omitted the filesystem
name in clusters with only one filesystem. Print the
file system name no matter what.

Signed-off-by: Douglas Fuller <dfuller@redhat.com>
src/mds/FSMap.cc

index e4b7a051396117a225cb3252b99175b38484aab3..aa351d5a56db2ba6540003fe28498eab32146378 100644 (file)
@@ -126,16 +126,10 @@ void FSMap::print_summary(Formatter *f, ostream *out) const
       f->dump_unsigned("max", fs->mds_map.max_mds);
     }
   } else {
-    if (filesystems.size() == 1) {
-      auto fs = filesystems.begin()->second;
-      *out << fs->mds_map.up.size() << "/" << fs->mds_map.in.size() << "/"
-           << fs->mds_map.max_mds << " up";
-    } else {
-      for (auto i : filesystems) {
-        auto fs = i.second;
-        *out << fs->mds_map.fs_name << "-" << fs->mds_map.up.size() << "/"
-             << fs->mds_map.in.size() << "/" << fs->mds_map.max_mds << " up ";
-      }
+    for (auto i : filesystems) {
+      auto fs = i.second;
+      *out << fs->mds_map.fs_name << "-" << fs->mds_map.up.size() << "/"
+          << fs->mds_map.in.size() << "/" << fs->mds_map.max_mds << " up ";
     }
   }