diff --git a/src/osd/mClockClientQueue.cc b/src/osd/mClockClientQueue.cc index 31ce375e354..a56bf1d5ecd 100644 --- a/src/osd/mClockClientQueue.cc +++ b/src/osd/mClockClientQueue.cc @@ -58,24 +58,24 @@ namespace ceph { } - dmc::ClientInfo + const dmc::ClientInfo* mClockClientQueue::op_class_client_info_f( const mClockClientQueue::InnerClient& client) { switch(client.second) { case osd_op_type_t::client_op: - return mclock_op_tags->client_op; + return &mclock_op_tags->client_op; case osd_op_type_t::osd_subop: - return mclock_op_tags->osd_subop; + return &mclock_op_tags->osd_subop; case osd_op_type_t::bg_snaptrim: - return mclock_op_tags->snaptrim; + return &mclock_op_tags->snaptrim; case osd_op_type_t::bg_recovery: - return mclock_op_tags->recov; + return &mclock_op_tags->recov; case osd_op_type_t::bg_scrub: - return mclock_op_tags->scrub; + return &mclock_op_tags->scrub; default: assert(0); - return dmc::ClientInfo(-1, -1, -1); + return nullptr; } } diff --git a/src/osd/mClockClientQueue.h b/src/osd/mClockClientQueue.h index 42bb175f7a0..b51bf7546c7 100644 --- a/src/osd/mClockClientQueue.h +++ b/src/osd/mClockClientQueue.h @@ -62,7 +62,7 @@ namespace ceph { mClockClientQueue(CephContext *cct); - static crimson::dmclock::ClientInfo + static const crimson::dmclock::ClientInfo* op_class_client_info_f(const InnerClient& client); inline unsigned length() const override final { diff --git a/src/osd/mClockOpClassQueue.cc b/src/osd/mClockOpClassQueue.cc index 743c7e36725..e8d28b7f594 100644 --- a/src/osd/mClockOpClassQueue.cc +++ b/src/osd/mClockOpClassQueue.cc @@ -58,22 +58,22 @@ namespace ceph { } - dmc::ClientInfo + const dmc::ClientInfo* mClockOpClassQueue::op_class_client_info_f(const osd_op_type_t& op_type) { switch(op_type) { case osd_op_type_t::client_op: - return mclock_op_tags->client_op; + return &mclock_op_tags->client_op; case osd_op_type_t::osd_subop: - return mclock_op_tags->osd_subop; + return &mclock_op_tags->osd_subop; case osd_op_type_t::bg_snaptrim: - return mclock_op_tags->snaptrim; + return &mclock_op_tags->snaptrim; case osd_op_type_t::bg_recovery: - return mclock_op_tags->recov; + return &mclock_op_tags->recov; case osd_op_type_t::bg_scrub: - return mclock_op_tags->scrub; + return &mclock_op_tags->scrub; default: assert(0); - return dmc::ClientInfo(-1, -1, -1); + return nullptr; } } diff --git a/src/osd/mClockOpClassQueue.h b/src/osd/mClockOpClassQueue.h index de9757f6354..7a2cc6905f7 100644 --- a/src/osd/mClockOpClassQueue.h +++ b/src/osd/mClockOpClassQueue.h @@ -60,7 +60,7 @@ namespace ceph { mClockOpClassQueue(CephContext *cct); - static crimson::dmclock::ClientInfo + static const crimson::dmclock::ClientInfo* op_class_client_info_f(const osd_op_type_t& op_type); inline unsigned length() const override final { diff --git a/src/test/common/test_mclock_priority_queue.cc b/src/test/common/test_mclock_priority_queue.cc index 3ffb2e174dc..3db94d8a56f 100644 --- a/src/test/common/test_mclock_priority_queue.cc +++ b/src/test/common/test_mclock_priority_queue.cc @@ -48,10 +48,10 @@ struct Client { }; -crimson::dmclock::ClientInfo client_info_func(const Client& c) { +const crimson::dmclock::ClientInfo* client_info_func(const Client& c) { static const crimson::dmclock::ClientInfo the_info(10.0, 10.0, 10.0); - return the_info; + return &the_info; }