2222#include " osd/SnapMapper.h"
2323
2424#include " crimson/common/interruptible_future.h"
25+ #include " crimson/common/log.h"
2526#include " crimson/common/type_helpers.h"
2627#include " crimson/os/futurized_collection.h"
2728#include " crimson/osd/backfill_state.h"
@@ -181,10 +182,16 @@ class PG : public boost::intrusive_ref_counter<
181182 void send_cluster_message (
182183 int osd, MessageURef m,
183184 epoch_t epoch, bool share_map_update=false ) final {
185+ LOG_PREFIX (PG::send_cluster_message);
186+ SUBDEBUGDPP (
187+ osd, " message {} to {} share_map_update {}" ,
188+ *this , *m, osd, share_map_update);
184189 (void )shard_services.send_to_osd (osd, std::move (m), epoch);
185190 }
186191
187192 void send_pg_created (pg_t pgid) final {
193+ LOG_PREFIX (PG::send_pg_created);
194+ SUBDEBUGDPP (osd, " pgid {}" , *this , pgid);
188195 (void )shard_services.send_pg_created (pgid);
189196 }
190197
@@ -204,6 +211,8 @@ class PG : public boost::intrusive_ref_counter<
204211
205212 template <typename T>
206213 void start_peering_event_operation (T &&evt, float delay = 0 ) {
214+ LOG_PREFIX (PG::start_peering_event_operations);
215+ SUBDEBUGDPP (osd, " event {} delay {}" , *this , evt.get_desc (), delay);
207216 (void ) shard_services.start_operation <LocalPeeringEvent>(
208217 this ,
209218 pg_whoami,
@@ -224,6 +233,10 @@ class PG : public boost::intrusive_ref_counter<
224233 unsigned priority,
225234 PGPeeringEventURef on_grant,
226235 PGPeeringEventURef on_preempt) final {
236+ LOG_PREFIX (PG::request_local_background_io_reservation);
237+ SUBDEBUGDPP (
238+ osd, " priority {} on_grant {} on_preempt {}" ,
239+ *this , on_grant->get_desc (), on_preempt->get_desc ());
227240 // TODO -- we probably want to add a mechanism for blocking on this
228241 // after handling the peering event
229242 std::ignore = shard_services.local_request_reservation (
@@ -240,6 +253,8 @@ class PG : public boost::intrusive_ref_counter<
240253
241254 void update_local_background_io_priority (
242255 unsigned priority) final {
256+ LOG_PREFIX (PG::update_local_background_io_priority);
257+ SUBDEBUGDPP (osd, " priority {}" , *this , priority);
243258 // TODO -- we probably want to add a mechanism for blocking on this
244259 // after handling the peering event
245260 std::ignore = shard_services.local_update_priority (
@@ -248,6 +263,8 @@ class PG : public boost::intrusive_ref_counter<
248263 }
249264
250265 void cancel_local_background_io_reservation () final {
266+ LOG_PREFIX (PG::cancel_local_background_io_reservation);
267+ SUBDEBUGDPP (osd, " " , *this );
251268 // TODO -- we probably want to add a mechanism for blocking on this
252269 // after handling the peering event
253270 std::ignore = shard_services.local_cancel_reservation (
@@ -258,6 +275,10 @@ class PG : public boost::intrusive_ref_counter<
258275 unsigned priority,
259276 PGPeeringEventURef on_grant,
260277 PGPeeringEventURef on_preempt) final {
278+ LOG_PREFIX (PG::request_remote_recovery_reservation);
279+ SUBDEBUGDPP (
280+ osd, " priority {} on_grant {} on_preempt {}" ,
281+ *this , on_grant->get_desc (), on_preempt->get_desc ());
261282 // TODO -- we probably want to add a mechanism for blocking on this
262283 // after handling the peering event
263284 std::ignore = shard_services.remote_request_reservation (
@@ -273,6 +294,8 @@ class PG : public boost::intrusive_ref_counter<
273294 }
274295
275296 void cancel_remote_recovery_reservation () final {
297+ LOG_PREFIX (PG::cancel_remote_recovery_reservation);
298+ SUBDEBUGDPP (osd, " " , *this );
276299 // TODO -- we probably want to add a mechanism for blocking on this
277300 // after handling the peering event
278301 std::ignore = shard_services.remote_cancel_reservation (
@@ -282,6 +305,8 @@ class PG : public boost::intrusive_ref_counter<
282305 void schedule_event_on_commit (
283306 ceph::os::Transaction &t,
284307 PGPeeringEventRef on_commit) final {
308+ LOG_PREFIX (PG::schedule_event_on_commit);
309+ SUBDEBUGDPP (osd, " on_commit {}" , *this , on_commit->get_desc ());
285310 t.register_on_commit (
286311 make_lambda_context (
287312 [this , on_commit=std::move (on_commit)](int ) {
@@ -299,11 +324,15 @@ class PG : public boost::intrusive_ref_counter<
299324 // Not needed yet
300325 }
301326 void queue_want_pg_temp (const std::vector<int > &wanted) final {
327+ LOG_PREFIX (PG::queue_want_pg_temp);
328+ SUBDEBUGDPP (osd, " wanted {}" , *this , wanted);
302329 // TODO -- we probably want to add a mechanism for blocking on this
303330 // after handling the peering event
304331 std::ignore = shard_services.queue_want_pg_temp (pgid.pgid , wanted);
305332 }
306333 void clear_want_pg_temp () final {
334+ LOG_PREFIX (PG::clear_want_pg_temp);
335+ SUBDEBUGDPP (osd, " " , *this );
307336 // TODO -- we probably want to add a mechanism for blocking on this
308337 // after handling the peering event
309338 std::ignore = shard_services.remove_want_pg_temp (pgid.pgid );
0 commit comments