From: xie xingguo Date: Mon, 3 Sep 2018 07:37:36 +0000 (+0800) Subject: osd/PrimaryLogPG: avoid dereferencing invalid complete_to X-Git-Tag: v12.2.9~134^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F23211%2Fhead;p=ceph.git osd/PrimaryLogPG: avoid dereferencing invalid complete_to For the auto-repair (EIO caused) case, we will not reinitialize **complete_to** (because last_complete is equal to last_update!) and hence there is chance that **complete_to** should aleady point to **log.end()** before we call recover_got. We could simply drop it here as we (already) logged the **complete_to** iterator change in a more compatible way a few lines below. Signed-off-by: xie xingguo (cherry picked from commit 69a2cc35840939436da09691ca62476d7f599de4) --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 987e2b94097f..aa99e398ae32 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -10671,8 +10671,6 @@ void PrimaryLogPG::_applied_recovered_object_replica() void PrimaryLogPG::recover_got(hobject_t oid, eversion_t v) { dout(10) << "got missing " << oid << " v " << v << dendl; - dout(10) << __func__ << " complete_to " - << pg_log.get_log().complete_to->version << dendl; pg_log.recover_got(oid, v, info); if (pg_log.get_log().complete_to != pg_log.get_log().log.end()) { dout(10) << "last_complete now " << info.last_complete