]> 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)
committerSamuel Just <sam.just@inktank.com>
Wed, 6 Nov 2013 19:02:19 +0000 (11:02 -0800)
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>
src/osd/PGLog.cc

index 526baecf1284a660606ee1cda6525c341a087ba1..9f6ca1f70c3bcbd8c4aa5a5c182b2a677049e66d 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;