]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/osd_type: use f->dump_unsigned() when appropriate 41517/head
authorKefu Chai <kchai@redhat.com>
Tue, 25 May 2021 06:23:13 +0000 (14:23 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 25 May 2021 06:28:27 +0000 (14:28 +0800)
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>
src/osd/osd_types.cc

index 07bdf025a45fe91f7b693f66e3b3de43eab0ee59..2c5da52158fd80b71b4b2148290e9ca130d63e42 100644 (file)
@@ -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;