]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd/shard_services: make use of PGCreationBlockingEvent
authorAishwarya Mathuria <amathuri@redhat.com>
Thu, 17 Apr 2025 14:02:37 +0000 (14:02 +0000)
committerAishwarya Mathuria <amathuri@redhat.com>
Thu, 22 May 2025 06:20:38 +0000 (06:20 +0000)
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 <amathuri@redhat.com>
src/crimson/osd/shard_services.cc
src/crimson/osd/shard_services.h

index e83084b9fc90e7f9dc423c21cd4acacf67ab0145..1ca67547584ca52d605d8640ec830472ce562f1e 100644 (file)
@@ -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<Ref<PG>> ShardServices::load_pg(spg_t pgid)
 
 {
index 4c7f2dbf578163e30ffa8476fe27a862fe9aa0ef..e9ccc74546fb815cee31dc4f97e75feb7a1e89cc 100644 (file)
@@ -540,6 +540,10 @@ public:
   using wait_for_pg_ret = wait_for_pg_ertr::future<Ref<PG>>;
   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<Ref<PG>> load_pg(spg_t pgid);
 
   /// Dispatch and reset ctx transaction