From: Patrick Donnelly Date: Wed, 2 Jun 2021 14:28:49 +0000 (-0700) Subject: mds: do not infinitely recursively print a metric X-Git-Tag: v16.2.5~76^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cab0dc97a59e08aef53ac916f68de1cb06ba1dc6;p=ceph.git mds: do not infinitely recursively print a metric Fixes: b1b44d775df3160d937c068d5e1079e24199ed6b Fixes: https://tracker.ceph.com/issues/51067 Signed-off-by: Patrick Donnelly (cherry picked from commit 20a622a87ea4cd9671d975d09d33363726f4fc69) --- diff --git a/src/include/cephfs/metrics/Types.h b/src/include/cephfs/metrics/Types.h index c89441695c82..0c12de7c3b19 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;