]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PGLog::rewind_divergent_log: log may not contain newhead
authorSamuel Just <sam.just@inktank.com>
Wed, 6 Nov 2013 01:47:48 +0000 (17:47 -0800)
committerSage Weil <sage@inktank.com>
Tue, 1 Apr 2014 19:02:27 +0000 (12:02 -0700)
Due to split, there may be a hole at newhead.

Fixes: #6722
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
(cherry picked from commit f4648bc6fec89c870e0c47b38b2f13496742b10f)

src/osd/PGLog.cc

index 73ee61920e8ff9e0205c46fdd0fb2fb7ff11408f..1b0482b251162ba2a708bdd6435d4853e098f9a9 100644 (file)
@@ -360,7 +360,7 @@ void PGLog::rewind_divergent_log(ObjectStore::Transaction& t, eversion_t newhead
     }
     --p;
     mark_dirty_from(p->version);
-    if (p->version == newhead) {
+    if (p->version <= newhead) {
       ++p;
       divergent.splice(divergent.begin(), log.log, p, log.log.end());
       break;