]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PrimaryLogPG: avoid dereferencing invalid complete_to 23894/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Mon, 3 Sep 2018 07:37:36 +0000 (15:37 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Mon, 3 Sep 2018 07:37:36 +0000 (15:37 +0800)
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 <xie.xingguo@zte.com.cn>
src/osd/PrimaryLogPG.cc

index c81562fc405d556384d608ab25e9c72c0890e829..09550173d5237b7d48777631f35f609ede2527c6 100644 (file)
@@ -11493,8 +11493,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