From 6abbcf6038a04bc4bd7949eee06bda8f0f8d9d91 Mon Sep 17 00:00:00 2001 From: Aishwarya Mathuria Date: Thu, 17 Apr 2025 14:02:37 +0000 Subject: [PATCH] crimson/osd/shard_services: make use of PGCreationBlockingEvent For every split child PG being created, make an entry in the wait_for_pg map using a PGCreationBlockingEvent trigger. This change ensures that even split PGs are part of the pgs_creating map that tracks PGCreationState of a PG by the addition of the create_split_pg method. Signed-off-by: Aishwarya Mathuria --- src/crimson/osd/shard_services.cc | 11 +++++++++++ src/crimson/osd/shard_services.h | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/src/crimson/osd/shard_services.cc b/src/crimson/osd/shard_services.cc index e83084b9fc90e..1ca67547584ca 100644 --- a/src/crimson/osd/shard_services.cc +++ b/src/crimson/osd/shard_services.cc @@ -739,6 +739,17 @@ ShardServices::wait_for_pg( return local_state.pg_map.wait_for_pg(std::move(trigger), pgid).first; } +ShardServices::wait_for_pg_ret +ShardServices::create_split_pg( + PGMap::PGCreationBlockingEvent::TriggerI&& trigger, + spg_t pgid) +{ + auto fut = local_state.pg_map.wait_for_pg( + std::move(trigger), pgid).first; + local_state.pg_map.set_creating(pgid); + return fut; +} + seastar::future> ShardServices::load_pg(spg_t pgid) { diff --git a/src/crimson/osd/shard_services.h b/src/crimson/osd/shard_services.h index 4c7f2dbf57816..e9ccc74546fb8 100644 --- a/src/crimson/osd/shard_services.h +++ b/src/crimson/osd/shard_services.h @@ -540,6 +540,10 @@ public: using wait_for_pg_ret = wait_for_pg_ertr::future>; wait_for_pg_ret wait_for_pg( PGMap::PGCreationBlockingEvent::TriggerI&&, spg_t pgid); + wait_for_pg_ret create_split_pg( + PGMap::PGCreationBlockingEvent::TriggerI&& trigger, + spg_t pgid); + seastar::future> load_pg(spg_t pgid); /// Dispatch and reset ctx transaction -- 2.39.5