diff options
author | Yanhu Cao <gmayyyha@gmail.com> | 2020-07-27 04:23:01 +0200 |
---|---|---|
committer | Yanhu Cao <gmayyyha@gmail.com> | 2020-07-27 05:46:52 +0200 |
commit | 728ea6ef3a9860760e97ec76772a9965befa9e30 (patch) | |
tree | 0a7cc8a5a6eb488127a9b7d6cb8b2d6df0f67736 | |
parent | Merge pull request #36081 from winndows/superfluous_break4 (diff) | |
download | ceph-728ea6ef3a9860760e97ec76772a9965befa9e30.tar.xz ceph-728ea6ef3a9860760e97ec76772a9965befa9e30.zip |
mds: fix mds peer request 'no_available_op_found'
Fixes: https://tracker.ceph.com/issues/46583
Signed-off-by: Yanhu Cao <gmayyyha@gmail.com>
-rw-r--r-- | src/mds/Mutation.cc | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/src/mds/Mutation.cc b/src/mds/Mutation.cc index 5359e0a91ce..bd3e36cbf00 100644 --- a/src/mds/Mutation.cc +++ b/src/mds/Mutation.cc @@ -509,26 +509,28 @@ void MDRequestImpl::_dump(Formatter *f) const f->dump_stream("client") << _client_request->get_orig_source(); f->dump_int("tid", _client_request->get_tid()); f->close_section(); // client_info - } else if (is_peer() && _peer_request) { // replies go to an existing mdr + } else if (is_peer()) { // replies go to an existing mdr f->dump_string("op_type", "peer_request"); f->open_object_section("leader_info"); - f->dump_stream("leader") << _peer_request->get_orig_source(); + f->dump_stream("leader") << peer_to_mds; f->close_section(); // leader_info - f->open_object_section("request_info"); - f->dump_int("attempt", _peer_request->get_attempt()); - f->dump_string("op_type", - MMDSPeerRequest::get_opname(_peer_request->get_op())); - f->dump_int("lock_type", _peer_request->get_lock_type()); - f->dump_stream("object_info") << _peer_request->get_object_info(); - f->dump_stream("srcdnpath") << _peer_request->srcdnpath; - f->dump_stream("destdnpath") << _peer_request->destdnpath; - f->dump_stream("witnesses") << _peer_request->witnesses; - f->dump_bool("has_inode_export", - _peer_request->inode_export_v != 0); - f->dump_int("inode_export_v", _peer_request->inode_export_v); - f->dump_stream("op_stamp") << _peer_request->op_stamp; - f->close_section(); // request_info + if (_peer_request) { + f->open_object_section("request_info"); + f->dump_int("attempt", _peer_request->get_attempt()); + f->dump_string("op_type", + MMDSPeerRequest::get_opname(_peer_request->get_op())); + f->dump_int("lock_type", _peer_request->get_lock_type()); + f->dump_stream("object_info") << _peer_request->get_object_info(); + f->dump_stream("srcdnpath") << _peer_request->srcdnpath; + f->dump_stream("destdnpath") << _peer_request->destdnpath; + f->dump_stream("witnesses") << _peer_request->witnesses; + f->dump_bool("has_inode_export", + _peer_request->inode_export_v != 0); + f->dump_int("inode_export_v", _peer_request->inode_export_v); + f->dump_stream("op_stamp") << _peer_request->op_stamp; + f->close_section(); // request_info + } } else if (internal_op != -1) { // internal request f->dump_string("op_type", "internal_op"); @@ -560,6 +562,8 @@ void MDRequestImpl::_dump_op_descriptor_unlocked(ostream& stream) const _client_request->print(stream); } else if (_peer_request) { _peer_request->print(stream); + } else if (is_peer()) { + stream << "peer_request:" << reqid; } else if (internal_op >= 0) { stream << "internal op " << ceph_mds_op_name(internal_op) << ":" << reqid; } else { |