From: Amnon Hanuhov Date: Tue, 1 Sep 2020 12:07:08 +0000 (+0300) Subject: Got rid of global flag eio_errors_to_process X-Git-Tag: v16.1.0~1066^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=57f13a8618e3546b5bfcc9165de1c4a417556240;p=ceph.git Got rid of global flag eio_errors_to_process Signed-off-by: Amnon Hanuhov --- diff --git a/src/osd/PG.h b/src/osd/PG.h index 4e15536f2d4..3d446a31308 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -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; diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index a75651e5075..d8b01592b18 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -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( @@ -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( @@ -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( - 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( + get_osdmap_epoch(), + get_osdmap_epoch(), + PeeringState::DoRecovery()))); return -EAGAIN; }