From: Samuel Just Date: Thu, 20 Feb 2014 00:17:17 +0000 (-0800) Subject: ReplicatedPG: assert no omap for ec pool in _write_copy_chunk and skip X-Git-Tag: v0.78~148^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=67d1f364e4ae4775d25bece461634e75fc79df3d;p=ceph.git ReplicatedPG: assert no omap for ec pool in _write_copy_chunk and skip Signed-off-by: Samuel Just --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 538296768eab..3de2c21608b7 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -5537,15 +5537,20 @@ void ReplicatedPG::_write_copy_chunk(CopyOpRef cop, PGBackend::PGTransaction *t) cop->data); cop->data.clear(); } - if (!cop->temp_cursor.omap_complete) { - if (cop->omap_header.length()) { - t->omap_setheader( - cop->results.temp_oid, - cop->omap_header); - cop->omap_header.clear(); + if (!pool.info.require_rollback()) { + if (!cop->temp_cursor.omap_complete) { + if (cop->omap_header.length()) { + t->omap_setheader( + cop->results.temp_oid, + cop->omap_header); + cop->omap_header.clear(); + } + t->omap_setkeys(cop->results.temp_oid, cop->omap); + cop->omap.clear(); } - t->omap_setkeys(cop->results.temp_oid, cop->omap); - cop->omap.clear(); + } else { + assert(cop->omap_header.length() == 0); + assert(cop->omap.empty()); } cop->temp_cursor = cop->cursor; }