]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: assert no omap for ec pool in _write_copy_chunk and skip
authorSamuel Just <sam.just@inktank.com>
Thu, 20 Feb 2014 00:17:17 +0000 (16:17 -0800)
committerSamuel Just <sam.just@inktank.com>
Thu, 20 Feb 2014 01:31:37 +0000 (17:31 -0800)
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/ReplicatedPG.cc

index 538296768eab2e3ae3cfc55da2a7bc0df41762dd..3de2c21608b7bae96120319818c713a552d8e531 100644 (file)
@@ -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;
 }