]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: do not infinitely recursively print a metric
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 2 Jun 2021 14:28:49 +0000 (07:28 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 2 Jun 2021 14:35:57 +0000 (07:35 -0700)
Fixes: b1b44d775df3160d937c068d5e1079e24199ed6b
Fixes: https://tracker.ceph.com/issues/51067
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/include/cephfs/metrics/Types.h

index d5589136de29e69c52078f105acb0272692eacc1..16c87712084bb50076603f6994411bcf4e2b0f14 100644 (file)
@@ -53,7 +53,8 @@ inline std::ostream &operator<<(std::ostream &os, const ClientMetricType &type)
     os << "OPENED_INODES";
     break;
   default:
-    os << "Unknown metric type: " << type;
+    os << "(UNKNOWN:" << static_cast<std::underlying_type<ClientMetricType>::type>(type) << ")";
+    break;
   }
 
   return os;