]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: handle omap > max_recovery_chunk
authorSamuel Just <sam.just@inktank.com>
Wed, 23 Jan 2013 20:49:04 +0000 (12:49 -0800)
committerSamuel Just <sam.just@inktank.com>
Wed, 23 Jan 2013 20:49:04 +0000 (12:49 -0800)
span_of fails if len == 0.

Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/ReplicatedPG.cc

index 80eec2e16fc08fc1ceb4b7e72c13b76801e16157..7afa364af13caaebdc2d4fcf5a4ee80190aa4d66 100644 (file)
@@ -5577,9 +5577,13 @@ int ReplicatedPG::send_push(int prio, int peer,
       new_progress.omap_recovered_to = iter->key();
   }
 
-  subop->data_included.span_of(recovery_info.copy_subset,
-                              progress.data_recovered_to,
-                              available);
+  if (available > 0) {
+    subop->data_included.span_of(recovery_info.copy_subset,
+                                progress.data_recovered_to,
+                                available);
+  } else {
+    subop->data_included.clear();
+  }
 
   for (interval_set<uint64_t>::iterator p = subop->data_included.begin();
        p != subop->data_included.end();