]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
OSD: split temp collection as well
authorSamuel Just <sam.just@inktank.com>
Fri, 15 Mar 2013 22:13:46 +0000 (15:13 -0700)
committerSamuel Just <sam.just@inktank.com>
Sat, 16 Mar 2013 00:05:54 +0000 (17:05 -0700)
Otherwise, when we eventually remove the temp collection, there might be
objects in the temp collection which were independently pulled into the child
pg collection.  Thus, removing the old stale parent link from its temp
collection also blasts the omap entries and snap mappings for the real child
object.

Backport: bobtail
Fixes: #4452
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
src/osd/OSD.cc

index 4f4870d8b6ecafcb6da4607f55d3cfb2d69df03b..0f2707c22f126ddf3f07d3cd760ff67d4340f19a 100644 (file)
@@ -4702,6 +4702,15 @@ void OSD::split_pgs(
       split_bits,
       i->m_seed,
       coll_t(*i));
+    if (parent->have_temp_coll()) {
+      rctx->transaction->create_collection(
+       coll_t::make_temp_coll(*i));
+      rctx->transaction->split_collection(
+       coll_t::make_temp_coll(parent->info.pgid),
+       split_bits,
+       i->m_seed,
+       coll_t::make_temp_coll(*i));
+    }
     for (interval_set<snapid_t>::iterator k = parent->snap_collections.begin();
         k != parent->snap_collections.end();
         ++k) {