From: Samuel Just Date: Fri, 15 Mar 2013 22:13:46 +0000 (-0700) Subject: OSD: split temp collection as well X-Git-Tag: v0.60~59 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f8d66e87a5c155b027cc6249006b83b4ac9b6c9b;p=ceph.git OSD: split temp collection as well 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 Reviewed-by: Josh Durgin --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 4f4870d8b6ec..0f2707c22f12 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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::iterator k = parent->snap_collections.begin(); k != parent->snap_collections.end(); ++k) {