From 20a622a87ea4cd9671d975d09d33363726f4fc69 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Wed, 2 Jun 2021 07:28:49 -0700 Subject: [PATCH] mds: do not infinitely recursively print a metric Fixes: b1b44d775df3160d937c068d5e1079e24199ed6b Fixes: https://tracker.ceph.com/issues/51067 Signed-off-by: Patrick Donnelly --- src/include/cephfs/metrics/Types.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/include/cephfs/metrics/Types.h b/src/include/cephfs/metrics/Types.h index d5589136de2..16c87712084 100644 --- a/src/include/cephfs/metrics/Types.h +++ b/src/include/cephfs/metrics/Types.h @@ -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::type>(type) << ")"; + break; } return os; -- 2.39.5