From: Samuel Just Date: Wed, 6 Nov 2013 01:47:48 +0000 (-0800) Subject: PGLog::rewind_divergent_log: log may not contain newhead X-Git-Tag: v0.67.8~26 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=26eeab43f3f703a25e7ba62c75d0382d15e38263;p=ceph.git PGLog::rewind_divergent_log: log may not contain newhead Due to split, there may be a hole at newhead. Fixes: #6722 Signed-off-by: Samuel Just Reviewed-by: David Zafman (cherry picked from commit f4648bc6fec89c870e0c47b38b2f13496742b10f) --- diff --git a/src/osd/PGLog.cc b/src/osd/PGLog.cc index 73ee61920e8..1b0482b2511 100644 --- a/src/osd/PGLog.cc +++ b/src/osd/PGLog.cc @@ -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;