From 26eeab43f3f703a25e7ba62c75d0382d15e38263 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Tue, 5 Nov 2013 17:47:48 -0800 Subject: [PATCH] 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) --- src/osd/PGLog.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osd/PGLog.cc b/src/osd/PGLog.cc index 73ee61920e8ff..1b0482b251162 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; -- 2.39.5