From 90de64bd81fedcb9540e40d50420e169a4a81248 Mon Sep 17 00:00:00 2001 From: Alexey Sheplyakov Date: Mon, 20 Mar 2017 14:05:17 +0400 Subject: [PATCH] jewel: osd/PGLog: reindex properly on pg log split When PGLog::IndexedLog::split_into runs it builds the list, which means the old indices are wrong (point to bad memory), but index() will not rebuild them because ever since b858e86 we won't rebuild them if they are already built. Fix that by calling unindex() before the split. Based on 643ae42cf27f16dd6ed4e1402acc0483bb9fca74. Notice that both the child and the parent log are re-indexed in Jewel, so the only problem is missing unindex(). Signed-off-by: Alexey Sheplyakov --- src/osd/PGLog.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/osd/PGLog.cc b/src/osd/PGLog.cc index e8f2a3ac49ef3..c10f3fda52c42 100644 --- a/src/osd/PGLog.cc +++ b/src/osd/PGLog.cc @@ -67,6 +67,7 @@ void PGLog::IndexedLog::split_into( PGLog::IndexedLog *olog) { list oldlog; + unindex(); oldlog.swap(log); eversion_t old_tail; -- 2.39.5