]> 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>
Tue, 19 Mar 2013 17:33:02 +0000 (10:33 -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>
(cherry picked from commit f8d66e87a5c155b027cc6249006b83b4ac9b6c9b)

src/osd/OSD.cc

index d042bc10908e9c6ee1e0b9014885e289394adf15..c0e7d2335e2fd76f3f37a52553f57a5f51d3ad9c 100644 (file)
@@ -4573,6 +4573,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) {