queue_scrub_event_msg<PGScrubGotReplMaps>(pg, with_priority);
}
-void OSDService::queue_scrub_maps_compared(PG* pg, Scrub::scrub_prio_t with_priority)
-{
- // Resulting scrub event: 'MapsCompared'
- queue_scrub_event_msg<PGScrubMapsCompared>(pg, with_priority);
-}
-
void OSDService::queue_scrub_replica_pushes(PG *pg, Scrub::scrub_prio_t with_priority)
{
// Resulting scrub event: 'ReplicaPushesUpd'
/// Signals that there are more chunks to handle
void queue_scrub_next_chunk(PG* pg, Scrub::scrub_prio_t with_priority);
- /// Signals that we have finished comparing the maps for this chunk
- /// Note: required, as in Crimson this operation is 'futurized'.
- void queue_scrub_maps_compared(PG* pg, Scrub::scrub_prio_t with_priority);
-
void queue_for_rep_scrub(PG* pg,
Scrub::scrub_prio_t with_high_priority,
unsigned int qu_priority,
"ReplicaPushesUpd");
}
- void scrub_send_maps_compared(epoch_t queued, ThreadPool::TPHandle& handle)
- {
- forward_scrub_event(&ScrubPgIF::send_maps_compared, queued, "MapsCompared");
- }
-
void scrub_send_get_next_chunk(epoch_t queued, ThreadPool::TPHandle& handle)
{
forward_scrub_event(&ScrubPgIF::send_get_next_chunk, queued, "NextChunk");
pg->unlock();
}
-void PGScrubMapsCompared::run(OSD* osd,
- OSDShard* sdata,
- PGRef& pg,
- ThreadPool::TPHandle& handle)
-{
- pg->scrub_send_maps_compared(epoch_queued, handle);
- pg->unlock();
-}
-
void PGRepScrub::run(OSD* osd, OSDShard* sdata, PGRef& pg, ThreadPool::TPHandle& handle)
{
pg->replica_scrub(epoch_queued, activation_index, handle);
void run(OSD* osd, OSDShard* sdata, PGRef& pg, ThreadPool::TPHandle& handle) final;
};
-class PGScrubMapsCompared : public PGScrubItem {
- public:
- PGScrubMapsCompared(spg_t pg, epoch_t epoch_queued)
- : PGScrubItem{pg, epoch_queued, "PGScrubMapsCompared"}
- {}
- void run(OSD* osd, OSDShard* sdata, PGRef& pg, ThreadPool::TPHandle& handle) final;
-};
-
class PGRepScrub : public PGScrubItem {
public:
PGRepScrub(spg_t pg, epoch_t epoch_queued, Scrub::act_token_t op_token)
dout(10) << "scrubber event --<< " << __func__ << dendl;
}
-void PgScrubber::send_maps_compared(epoch_t epoch_queued)
-{
- dout(10) << "scrubber event -->> " << __func__ << " epoch: " << epoch_queued
- << dendl;
-
- m_fsm->process_event(Scrub::MapsCompared{});
-
- dout(10) << "scrubber event --<< " << __func__ << dendl;
-}
-
// -----------------
bool PgScrubber::is_reserving() const
// requeue the writes from the chunk that just finished
requeue_waiting();
- m_osds->queue_scrub_maps_compared(m_pg, Scrub::scrub_prio_t::low_priority);
}
Scrub::preemption_t& PgScrubber::get_preemptor()
void send_local_map_done(epoch_t epoch_queued) final;
- void send_maps_compared(epoch_t epoch_queued) final;
-
void send_get_next_chunk(epoch_t epoch_queued) final;
void send_scrub_is_finished(epoch_t epoch_queued) final;
return transit<PendingTimer>();
} else {
-
- // maps_compare_n_cleanup() will arrange for MapsCompared event to be
- // sent:
scrbr->maps_compare_n_cleanup();
- return discard_event();
+ return transit<WaitDigestUpdate>();
}
} else {
return discard_event();
/// scrub_snapshot_metadata()
MEV(DigestUpdate)
-/// maps_compare_n_cleanup() transactions are done
-MEV(MapsCompared)
-
/// event emitted when the replica grants a reservation to the primary
MEV(ReplicaGrantReservation)
using reactions = mpl::list<
// all replicas are accounted for:
sc::custom_reaction<GotReplicas>,
- sc::transition<MapsCompared, WaitDigestUpdate>,
sc::custom_reaction<DigestUpdate>>;
sc::result react(const GotReplicas&);
virtual void send_scrub_is_finished(epoch_t epoch_queued) = 0;
- virtual void send_maps_compared(epoch_t epoch_queued) = 0;
-
virtual void on_applied_when_primary(const eversion_t& applied_version) = 0;
// --------------------------------------------------