From 8433941c946baf6fc2c3ff738c97ac3d57e2d680 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 9 Feb 2018 13:16:19 -0600 Subject: [PATCH] osd: remove created_pgs tracking in RecoveryCtx Not needed or used! Signed-off-by: Sage Weil --- src/osd/OSD.cc | 10 +--------- src/osd/PG.h | 1 - 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 5f8ade3e6ff..e0fc34152a4 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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(); } } diff --git a/src/osd/PG.h b/src/osd/PG.h index 07e829afa4e..965ad7fea0f 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -975,7 +975,6 @@ public: map > *query_map; map > > *info_map; map > > *notify_list; - set created_pgs; C_Contexts *on_applied; C_Contexts *on_safe; ObjectStore::Transaction *transaction; -- 2.39.5