From: Kefu Chai Date: Tue, 25 May 2021 06:23:13 +0000 (+0800) Subject: osd/osd_type: use f->dump_unsigned() when appropriate X-Git-Tag: v17.1.0~1826^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=22128e3de697f3fdf66faf3fe3b701a3a599968f;p=ceph.git 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 --- diff --git a/src/osd/osd_types.cc b/src/osd/osd_types.cc index 07bdf025a45f..2c5da52158fd 100644 --- a/src/osd/osd_types.cc +++ b/src/osd/osd_types.cc @@ -2819,8 +2819,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;