From 0811c1b9da05b3dac9624f83bef01edae48cda23 Mon Sep 17 00:00:00 2001 From: Yingxin Cheng Date: Thu, 5 Dec 2024 16:52:42 +0800 Subject: [PATCH 1/2] crimson/net/io_handler: minor adjustments to logs Signed-off-by: Yingxin Cheng --- src/crimson/net/io_handler.cc | 4 ++-- src/crimson/net/io_handler.h | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/crimson/net/io_handler.cc b/src/crimson/net/io_handler.cc index b93124f3c1269..bc5e9bf404c59 100644 --- a/src/crimson/net/io_handler.cc +++ b/src/crimson/net/io_handler.cc @@ -347,7 +347,7 @@ void IOHandler::do_set_io_state( { ceph_assert_always(seastar::this_shard_id() == get_shard_id()); auto prv_state = get_io_state(); - logger().debug("{} got {}do_set_io_state(): prv_state={}, new_state={}, " + logger().debug("{} got {} do_set_io_state(): prv_state={}, new_state={}, " "fa={}, set_notify_out={}, at {}", conn, cc_seq.has_value() ? fmt::format("{} ", *cc_seq) : "", @@ -984,7 +984,7 @@ void IOHandler::notify_out_dispatch() }); }); } - if (shard_states->try_enter_out_dispatching()) { + if (shard_states->try_enter_out_dispatching(conn)) { shard_states->dispatch_in_background( "do_out_dispatch", conn, [this] { return do_out_dispatch(*shard_states); diff --git a/src/crimson/net/io_handler.h b/src/crimson/net/io_handler.h index 5986fcb16ac28..41c76ab925b84 100644 --- a/src/crimson/net/io_handler.h +++ b/src/crimson/net/io_handler.h @@ -309,7 +309,7 @@ class IOHandler final : public ConnectionHandler { in_exit_dispatching = std::nullopt; } - bool try_enter_out_dispatching() { + bool try_enter_out_dispatching(SocketConnection &conn) { assert(seastar::this_shard_id() == sid); if (out_dispatching) { // already dispatching out @@ -327,6 +327,9 @@ class IOHandler final : public ConnectionHandler { // do not dispatch out return false; default: + crimson::get_logger(ceph_subsys_ms).error( + "{} try_enter_out_dispatching() got wrong io_state {}", + conn, io_state); ceph_abort("impossible"); } } @@ -574,6 +577,8 @@ struct fmt::formatter case switched: name = "switched"; break; + default: + name = "undefined"; } return formatter::format(name, ctx); } From 6c095f02e4d09cd7214dee26ac76838c42dff44f Mon Sep 17 00:00:00 2001 From: Yingxin Cheng Date: Thu, 5 Dec 2024 16:54:37 +0800 Subject: [PATCH 2/2] qa/config/crimson_qa_overrides: enable ms debug Signed-off-by: Yingxin Cheng --- qa/config/crimson_qa_overrides.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/qa/config/crimson_qa_overrides.yaml b/qa/config/crimson_qa_overrides.yaml index 37f176db0a1c4..8cf98f3800167 100644 --- a/qa/config/crimson_qa_overrides.yaml +++ b/qa/config/crimson_qa_overrides.yaml @@ -10,6 +10,7 @@ overrides: osd: crimson osd obc lru size: 10 debug alienstore: 20 + debug ms: 20 flavor: crimson workunit: env: