| 68 | } |
| 69 | |
| 70 | void SimpleLock::dump(ceph::Formatter *f) const { |
| 71 | ceph_assert(f != NULL); |
| 72 | if (is_sync_and_unlocked()) { |
| 73 | return; |
| 74 | } |
| 75 | |
| 76 | f->open_array_section("gather_set"); |
| 77 | if (have_more()) { |
| 78 | for(const auto &i : more()->gather_set) { |
| 79 | f->dump_int("rank", i); |
| 80 | } |
| 81 | } |
| 82 | f->close_section(); |
| 83 | |
| 84 | f->dump_string("state", get_state_name(get_state())); |
| 85 | f->dump_string("type", get_lock_type_name(get_type())); |
| 86 | f->dump_bool("is_leased", is_leased()); |
| 87 | f->dump_int("num_rdlocks", get_num_rdlocks()); |
| 88 | f->dump_int("num_wrlocks", get_num_wrlocks()); |
| 89 | f->dump_int("num_xlocks", get_num_xlocks()); |
| 90 | f->open_object_section("xlock_by"); |
| 91 | if (auto mut = get_xlock_by(); mut) { |
| 92 | f->dump_object("reqid", mut->reqid); |
| 93 | } |
| 94 | f->close_section(); |
| 95 | } |
| 96 | |
| 97 | std::list<SimpleLock> SimpleLock::generate_test_instances() { |
| 98 | std::list<SimpleLock> ls; |
nothing calls this directly
no test coverage detected