]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG::finish_promote: do not prefill new_clones 5328/head
authorSamuel Just <sjust@redhat.com>
Thu, 9 Jul 2015 23:11:58 +0000 (16:11 -0700)
committerSamuel Just <sjust@redhat.com>
Thu, 9 Jul 2015 23:11:59 +0000 (16:11 -0700)
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 <sjust@redhat.com>
src/osd/ReplicatedPG.cc

index a443899a572addbf7acff4cd80ebdf0e4836ea89..20259e5d711227bb6ef41fcaf4e45dd6bae39722 100644 (file)
@@ -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<snapid_t> new_clones(tctx->new_snapset.clones.size());
+    vector<snapid_t> new_clones;
     for (vector<snapid_t>::iterator i = tctx->new_snapset.clones.begin();
         i != tctx->new_snapset.clones.end();
         ++i) {