]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: remove created_pgs tracking in RecoveryCtx
authorSage Weil <sage@redhat.com>
Fri, 9 Feb 2018 19:16:19 +0000 (13:16 -0600)
committerSage Weil <sage@redhat.com>
Wed, 4 Apr 2018 13:26:53 +0000 (08:26 -0500)
Not needed or used!

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc
src/osd/PG.h

index 5f8ade3e6ff50c262e63a650217b723cbfb96af6..e0fc34152a4afd9f2e3cc6f3a93e06397e0eb19f 100644 (file)
@@ -3931,7 +3931,6 @@ PGRef OSD::handle_pg_create_info(OSDMapRef osdmap, const PGCreateInfo *info)
 
   pg->handle_initialize(&rctx);
   pg->handle_activate_map(&rctx);
-  rctx.created_pgs.insert(pg);
 
   dispatch_context(rctx, pg.get(), osdmap, nullptr);
 
@@ -8013,7 +8012,6 @@ void OSD::split_pgs(
     child->lock(true);
     out_pgs->insert(child);
     child->ch = store->create_new_collection(child->coll);
-    rctx->created_pgs.insert(child);
 
     unsigned split_bits = i->get_split_bits(pg_num);
     dout(10) << " pg_num is " << pg_num
@@ -8163,11 +8161,9 @@ void OSD::dispatch_context_transaction(PG::RecoveryCtx &ctx, PG *pg,
       std::move(*ctx.transaction), TrackedOpRef(), handle);
     assert(tr == 0);
     delete (ctx.transaction);
-    ctx.created_pgs.clear();
     ctx.transaction = new ObjectStore::Transaction;
     ctx.on_applied = new C_Contexts(cct);
     ctx.on_safe = new C_Contexts(cct);
-    ctx.created_pgs.clear();
   }
 }
 
@@ -8188,12 +8184,10 @@ void OSD::dispatch_context(PG::RecoveryCtx &ctx, PG *pg, OSDMapRef curmap,
   delete ctx.info_map;
   if ((ctx.on_applied->empty() &&
        ctx.on_safe->empty() &&
-       ctx.transaction->empty() &&
-       ctx.created_pgs.empty()) || !pg) {
+       ctx.transaction->empty()) || !pg) {
     delete ctx.transaction;
     delete ctx.on_applied;
     delete ctx.on_safe;
-    assert(ctx.created_pgs.empty());
   } else {
     if (ctx.on_applied)
       ctx.transaction->register_on_applied(ctx.on_applied);
@@ -8203,10 +8197,8 @@ void OSD::dispatch_context(PG::RecoveryCtx &ctx, PG *pg, OSDMapRef curmap,
       pg->ch,
       std::move(*ctx.transaction), TrackedOpRef(),
       handle);
-    ctx.created_pgs.clear();
     delete (ctx.transaction);
     assert(tr == 0);
-    ctx.created_pgs.clear();
   }
 }
 
index 07e829afa4ef9c2a9ea2e2d808561ac4370f23b3..965ad7fea0f4583f29f4c8282741ae7e23398fd4 100644 (file)
@@ -975,7 +975,6 @@ public:
     map<int, map<spg_t, pg_query_t> > *query_map;
     map<int, vector<pair<pg_notify_t, PastIntervals> > > *info_map;
     map<int, vector<pair<pg_notify_t, PastIntervals> > > *notify_list;
-    set<PGRef> created_pgs;
     C_Contexts *on_applied;
     C_Contexts *on_safe;
     ObjectStore::Transaction *transaction;