From: Sage Weil Date: Fri, 1 Sep 2017 16:41:45 +0000 (-0400) Subject: osd/PrimaryLogPG: on_local_recover: drop legacy snapset handling X-Git-Tag: v13.0.1~840^2~18 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1f90d10b2af0127d27b47488875a2ee76d2262ec;p=ceph.git osd/PrimaryLogPG: on_local_recover: drop legacy snapset handling This was there to deal with jewel peers, which are no more. Signed-off-by: Sage Weil --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 9cd58c12bc80..b2831f877d14 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -346,16 +346,9 @@ void PrimaryLogPG::on_local_recover( set snaps; dout(20) << " snapset " << recovery_info.ss << " legacy_snaps " << recovery_info.oi.legacy_snaps << dendl; - if (recovery_info.ss.is_legacy() || - recovery_info.ss.seq == 0 /* jewel osd doesn't populate this */) { - assert(recovery_info.oi.legacy_snaps.size()); - snaps.insert(recovery_info.oi.legacy_snaps.begin(), - recovery_info.oi.legacy_snaps.end()); - } else { - auto p = recovery_info.ss.clone_snaps.find(hoid.snap); - assert(p != recovery_info.ss.clone_snaps.end()); // hmm, should we warn? - snaps.insert(p->second.begin(), p->second.end()); - } + auto p = recovery_info.ss.clone_snaps.find(hoid.snap); + assert(p != recovery_info.ss.clone_snaps.end()); // hmm, should we warn? + snaps.insert(p->second.begin(), p->second.end()); dout(20) << " snaps " << snaps << dendl; snap_mapper.add_oid( recovery_info.soid,