]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: use appropriate json types instead of stream when dumping info
authorJoao Eduardo Luis <joao.luis@inktank.com>
Thu, 19 Jun 2014 17:27:49 +0000 (18:27 +0100)
committerJoao Eduardo Luis <joao.luis@inktank.com>
Thu, 19 Jun 2014 17:39:07 +0000 (18:39 +0100)
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
src/osd/ECBackend.cc
src/osd/osd_types.cc

index e5bca82c34ab70951a7476fc614654006f532bf0..a75aa07fc82f363770697e21132f1e2e665bfa4a 100644 (file)
@@ -111,7 +111,7 @@ void ECBackend::ReadOp::dump(Formatter *f) const
   }
   f->dump_stream("to_read") << to_read;
   f->dump_stream("complete") << complete;
-  f->dump_stream("priority") << priority;
+  f->dump_int("priority", priority);
   f->dump_stream("obj_to_source") << obj_to_source;
   f->dump_stream("source_to_obj") << source_to_obj;
   f->dump_stream("in_progress") << in_progress;
@@ -158,7 +158,7 @@ void ECBackend::RecoveryOp::dump(Formatter *f) const
   f->dump_stream("missing_on_shards") << missing_on_shards;
   f->dump_stream("recovery_info") << recovery_info;
   f->dump_stream("recovery_progress") << recovery_progress;
-  f->dump_stream("pending_read") << pending_read;
+  f->dump_bool("pending_read", pending_read);
   f->dump_stream("state") << tostr(state);
   f->dump_stream("waiting_on_pushes") << waiting_on_pushes;
   f->dump_stream("extent_requested") << extent_requested;
index 4d48325cdea4ca6559910ee82a362e9ceeea6397..19a1a3d750ae1f0a0f91fb80506334f0da3f1865 100644 (file)
@@ -2102,8 +2102,8 @@ void pg_notify_t::dump(Formatter *f) const
 {
   f->dump_int("from", from);
   f->dump_int("to", to);
-  f->dump_stream("query_epoch") << query_epoch;
-  f->dump_stream("epoch_sent") << epoch_sent;
+  f->dump_unsigned("query_epoch", query_epoch);
+  f->dump_unsigned("epoch_sent", epoch_sent);
   {
     f->open_object_section("info");
     info.dump(f);
@@ -2486,8 +2486,8 @@ struct DumpVisitor : public ObjectModDesc::Visitor {
 void ObjectModDesc::dump(Formatter *f) const
 {
   f->open_object_section("object_mod_desc");
-  f->dump_stream("can_local_rollback") << can_local_rollback;
-  f->dump_stream("stashed") << stashed;
+  f->dump_bool("can_local_rollback", can_local_rollback);
+  f->dump_bool("stashed", stashed);
   {
     f->open_array_section("ops");
     DumpVisitor vis(f);