]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/osd_type: use f->dump_unsigned() when appropriate 42257/head
authorKefu Chai <kchai@redhat.com>
Tue, 25 May 2021 06:23:13 +0000 (14:23 +0800)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Fri, 9 Jul 2021 05:41:08 +0000 (12:41 +0700)
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 <kchai@redhat.com>
(cherry picked from commit 22128e3de697f3fdf66faf3fe3b701a3a599968f)

src/osd/osd_types.cc

index cc5d91d528f9a5a0234f6fdc5ca747f20701ebc4..3f11eed818802846c53b0436b85b2580bde4fd45 100644 (file)
@@ -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;