]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: link back to pg slot
authorSage Weil <sage@redhat.com>
Fri, 9 Feb 2018 21:04:32 +0000 (15:04 -0600)
committerSage Weil <sage@redhat.com>
Wed, 4 Apr 2018 13:26:54 +0000 (08:26 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc
src/osd/PG.h

index 8e538fe1f07f7a2092eaa768def551fa3d0c66e4..0c53c424c4bf3806c638851e0622384398bdcc7f 100644 (file)
@@ -9250,6 +9250,7 @@ void OSDShard::_attach_pg(OSDShardPGSlot *slot, PG *pg)
   dout(10) << pg->pg_id << " " << pg << dendl;
   slot->pg = pg;
   pg->osd_shard = this;
+  pg->pg_slot = slot;
   ++osd->num_pgs;
 }
 
@@ -9257,6 +9258,7 @@ void OSDShard::_detach_pg(OSDShardPGSlot *slot)
 {
   dout(10) << slot->pg->pg_id << " " << slot->pg << dendl;
   slot->pg->osd_shard = nullptr;
+  slot->pg->pg_slot = nullptr;
   slot->pg = nullptr;
   --osd->num_pgs;
 }
index 965ad7fea0f4583f29f4c8282741ae7e23398fd4..bc583ac0743927601c7e77271faa77c07c1faf1e 100644 (file)
@@ -59,6 +59,7 @@
 class OSD;
 class OSDService;
 class OSDShard;
+class OSDShardPGSlot;
 class MOSDOp;
 class MOSDPGScan;
 class MOSDPGBackfill;
@@ -504,6 +505,7 @@ protected:
   OSDService *osd;
 public:
   OSDShard *osd_shard = nullptr;
+  OSDShardPGSlot *pg_slot = nullptr;
 protected:
   CephContext *cct;