From f4648bc6fec89c870e0c47b38b2f13496742b10f 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 --- 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 526baecf1284a..9f6ca1f70c3bc 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