From 643ae42cf27f16dd6ed4e1402acc0483bb9fca74 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 17 Feb 2017 14:50:38 -0500 Subject: [PATCH] osd/PGLog: reindex properly on pg log split When pg_log_t::split_out_child() runs it builds the list, which means the old indexes are wrong (the point to bad memory), but index() will not rebuild them because ever since b858e869e78927dccebaa350d246bd74af7f1de9 we won't rebuild them if they are already built. Fix that by calling unindex() before the split. Further, the new child log also needs to be indexed. Fix that too. Fixes: http://tracker.ceph.com/issues/18975 Signed-off-by: Sage Weil --- src/osd/PGLog.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/osd/PGLog.cc b/src/osd/PGLog.cc index cba1a524459..00469e6fdb5 100644 --- a/src/osd/PGLog.cc +++ b/src/osd/PGLog.cc @@ -35,8 +35,10 @@ PGLog::IndexedLog PGLog::IndexedLog::split_out_child( pg_t child_pgid, unsigned split_bits) { + unindex(); IndexedLog ret(pg_log_t::split_out_child(child_pgid, split_bits)); index(); + ret.index(); reset_rollback_info_trimmed_to_riter(); return ret; } -- 2.39.5