]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Got rid of global flag eio_errors_to_process 36989/head
authorAmnon Hanuhov <ahanukov@redhat.com>
Tue, 1 Sep 2020 12:07:08 +0000 (15:07 +0300)
committerAmnon Hanuhov <ahanukov@redhat.com>
Fri, 4 Sep 2020 09:54:08 +0000 (12:54 +0300)
Signed-off-by: Amnon Hanuhov <ahanukov@redhat.com>
src/osd/PG.h
src/osd/PrimaryLogPG.cc

index 4e15536f2d431bdd7b0fd54d741e93c08597bf6e..3d446a313082f7f655eec30ee414aa19ed7e385d 100644 (file)
@@ -628,7 +628,6 @@ private:
 protected:
   OSDriver osdriver;
   SnapMapper snap_mapper;
-  bool eio_errors_to_process = false;
 
   virtual PGBackend *get_pgbackend() = 0;
   virtual const PGBackend* get_pgbackend() const = 0;
index a75651e5075867aa0802cb198287feb39522f265..d8b01592b18e6520fb3acc2142864babd6f98766 100644 (file)
@@ -12077,7 +12077,6 @@ void PrimaryLogPG::on_activate_complete()
          PeeringState::RequestBackfill())));
   } else {
     dout(10) << "activate all replicas clean, no recovery" << dendl;
-    eio_errors_to_process = false;
     queue_peering_event(
       PGPeeringEventRef(
        std::make_shared<PGPeeringEvent>(
@@ -12440,7 +12439,6 @@ bool PrimaryLogPG::start_recovery_ops(
             PeeringState::RequestBackfill())));
     } else {
       dout(10) << "recovery done, no backfill" << dendl;
-      eio_errors_to_process = false;
       state_clear(PG_STATE_FORCED_BACKFILL);
       queue_peering_event(
         PGPeeringEventRef(
@@ -12454,7 +12452,6 @@ bool PrimaryLogPG::start_recovery_ops(
     state_clear(PG_STATE_FORCED_BACKFILL);
     state_clear(PG_STATE_FORCED_RECOVERY);
     dout(10) << "recovery done, backfill done" << dendl;
-    eio_errors_to_process = false;
     queue_peering_event(
       PGPeeringEventRef(
         std::make_shared<PGPeeringEvent>(
@@ -15109,23 +15106,15 @@ int PrimaryLogPG::rep_repair_primary_object(const hobject_t& soid, OpContext *ct
   waiting_for_unreadable_object[soid].push_back(op);
   op->mark_delayed("waiting for missing object");
 
-  if (!eio_errors_to_process) {
-    eio_errors_to_process = true;
-    ceph_assert(is_clean());
-    state_set(PG_STATE_REPAIR);
-    state_clear(PG_STATE_CLEAN);
-    queue_peering_event(
-        PGPeeringEventRef(
-         std::make_shared<PGPeeringEvent>(
-         get_osdmap_epoch(),
-         get_osdmap_epoch(),
-         PeeringState::DoRecovery())));
-  } else {
-    // A prior error must have already cleared clean state and queued recovery
-    // or a map change has triggered re-peering.
-    // Not inlining the recovery by calling maybe_kick_recovery(soid);
-    dout(5) << __func__<< ": Read error on " << soid << ", but already seen errors" << dendl;
-  }
+  ceph_assert(is_clean());
+  state_set(PG_STATE_REPAIR);
+  state_clear(PG_STATE_CLEAN);
+  queue_peering_event(
+      PGPeeringEventRef(
+       std::make_shared<PGPeeringEvent>(
+       get_osdmap_epoch(),
+       get_osdmap_epoch(),
+       PeeringState::DoRecovery())));
 
   return -EAGAIN;
 }