]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PeeringState: removed pre-mimic removed snap tracking
authorSage Weil <sage@redhat.com>
Thu, 30 May 2019 15:02:19 +0000 (10:02 -0500)
committerSage Weil <sage@redhat.com>
Tue, 2 Jul 2019 13:37:48 +0000 (08:37 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PG.cc
src/osd/PeeringState.cc
src/osd/PeeringState.h

index 9bc4a64523b8735add720fd796711a7033f2dd19..8b462b68e009636f9e52ebaa5510b56a4e643285 100644 (file)
@@ -1682,9 +1682,6 @@ void PG::on_active_advmap(const OSDMapRef &osdmap)
               << ", now " << recovery_state.get_info().purged_snaps << dendl;
       ceph_assert(!bad || !cct->_conf->osd_debug_verify_cached_snaps);
     }
-  } else if (!pool.newly_removed_snaps.empty()) {
-    snap_trimq.union_of(pool.newly_removed_snaps);
-    dout(10) << " snap_trimq now " << snap_trimq << dendl;
   }
 }
 
index 39e8911467dede99e10689d86a6b0678bc65f548..ad427502f37aed619b3a7dff72e04a8ef32adf04 100644 (file)
@@ -43,11 +43,6 @@ void PGPool::update(CephContext *cct, OSDMapRef map)
   }
 
   assert(map->require_osd_release >= ceph_release_t::mimic);
-  // mimic tracks removed_snaps_queue in the OSDmap and purged_snaps
-  // in the pg_info_t, with deltas for both in each OSDMap.  we don't
-  // need to (and can't) track it here.
-  cached_removed_snaps.clear();
-  newly_removed_snaps.clear();
   if (info.is_pool_snaps_mode() && updated) {
     snapc = pi->get_snap_context();
   }
@@ -2108,21 +2103,14 @@ void PeeringState::activate(
   if (is_primary()) {
     // initialize snap_trimq
     interval_set<snapid_t> to_trim;
-    if (get_osdmap()->require_osd_release < ceph_release_t::mimic) {
-      psdout(20) << "activate - purged_snaps " << info.purged_snaps
-                << " cached_removed_snaps " << pool.cached_removed_snaps
-                << dendl;
-      to_trim = pool.cached_removed_snaps;
-    } else {
-      auto& removed_snaps_queue = get_osdmap()->get_removed_snaps_queue();
-      auto p = removed_snaps_queue.find(info.pgid.pgid.pool());
-      if (p != removed_snaps_queue.end()) {
-       dout(20) << "activate - purged_snaps " << info.purged_snaps
-                << " removed_snaps " << p->second
-                << dendl;
-       for (auto q : p->second) {
-         to_trim.insert(q.first, q.second);
-       }
+    auto& removed_snaps_queue = get_osdmap()->get_removed_snaps_queue();
+    auto p = removed_snaps_queue.find(info.pgid.pgid.pool());
+    if (p != removed_snaps_queue.end()) {
+      dout(20) << "activate - purged_snaps " << info.purged_snaps
+              << " removed_snaps " << p->second
+              << dendl;
+      for (auto q : p->second) {
+       to_trim.insert(q.first, q.second);
       }
     }
     interval_set<snapid_t> purged;
index 2fa5c896a87fccad0f226402b3ac253ed599172e..4c30aa93648ea2d68471700d8bd3557cd18384cd 100644 (file)
@@ -34,10 +34,6 @@ struct PGPool {
   pg_pool_t info;
   SnapContext snapc;   // the default pool snapc, ready to go.
 
-  // these two sets are for < mimic only
-  interval_set<snapid_t> cached_removed_snaps;      // current removed_snaps set
-  interval_set<snapid_t> newly_removed_snaps;  // newly removed in the last epoch
-
   PGPool(CephContext* cct, OSDMapRef map, int64_t i, const pg_pool_t& info,
         const string& name)
     : cct(cct),