From e9d970598358b1e5cd0b468813a05be93cbac06f Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 25 May 2021 14:23:13 +0800 Subject: [PATCH] osd/osd_type: use f->dump_unsigned() when appropriate it is more explicit than `dump_stream()`, as we can not tell if dumped variable is an integer or not by reading the code. it helps us to figure out the scheme of the dumped object. Signed-off-by: Kefu Chai (cherry picked from commit 22128e3de697f3fdf66faf3fe3b701a3a599968f) --- src/osd/osd_types.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osd/osd_types.cc b/src/osd/osd_types.cc index cc5d91d528f9a..3f11eed818802 100644 --- a/src/osd/osd_types.cc +++ b/src/osd/osd_types.cc @@ -2763,8 +2763,8 @@ bool pg_stat_t::is_acting_osd(int32_t osd, bool primary) const void pg_stat_t::dump(Formatter *f) const { f->dump_stream("version") << version; - f->dump_stream("reported_seq") << reported_seq; - f->dump_stream("reported_epoch") << reported_epoch; + f->dump_unsigned("reported_seq", reported_seq); + f->dump_unsigned("reported_epoch", reported_epoch); f->dump_string("state", pg_state_string(state)); f->dump_stream("last_fresh") << last_fresh; f->dump_stream("last_change") << last_change; -- 2.39.5