This avoids infinite recursion when dumping locks with xlock_by
non-null.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
{
std::lock_guard l(lock);
f->dump_string("flag_point", _get_state_string());
- f->dump_stream("reqid") << reqid;
+ f->dump_object("reqid", reqid);
if (client_request) {
f->dump_string("op_type", "client_request");
f->open_object_section("client_info");
f->dump_int("num_wrlocks", get_num_wrlocks());
f->dump_int("num_xlocks", get_num_xlocks());
f->open_object_section("xlock_by");
- if (get_xlock_by()) {
- get_xlock_by()->dump(f);
+ if (auto mut = get_xlock_by(); mut) {
+ f->dump_object("reqid", mut->reqid);
}
f->close_section();
}
ls.back()->tid = 35434;
}
+void metareqid_t::dump(ceph::Formatter* f) const {
+ f->dump_object("entity", name);
+ f->dump_unsigned("tid", tid);
+}
/*
* inode_load_vec_t
decode(name, p);
decode(tid, p);
}
+ void dump(ceph::Formatter *f) const;
entity_name_t name;
uint64_t tid = 0;