From 57fbc23a47a0f96de416d21e674291dc91673407 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Thu, 9 Jul 2015 16:11:58 -0700 Subject: [PATCH] ReplicatedPG::finish_promote: do not prefill new_clones new_clones will end up smaller than clones. The removed clone will leave a 0 at the end. Fixes: 12263 Backport: firefly, hammer Signed-off-by: Samuel Just --- src/osd/ReplicatedPG.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index a443899a572..20259e5d711 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -6628,7 +6628,7 @@ void ReplicatedPG::finish_promote(int r, CopyResults *results, OpContext *tctx = repop->ctx; tctx->at_version = get_next_version(); filter_snapc(tctx->new_snapset.snaps); - vector new_clones(tctx->new_snapset.clones.size()); + vector new_clones; for (vector::iterator i = tctx->new_snapset.clones.begin(); i != tctx->new_snapset.clones.end(); ++i) { -- 2.47.3