pl->on_info_history_change();
}
+hobject_t PeeringState::earliest_backfill() const
+{
+ hobject_t e = hobject_t::get_max();
+ for (const pg_shard_t& bt : get_backfill_targets()) {
+ const pg_info_t &pi = get_peer_info(bt);
+ e = std::min(pi.last_backfill, e);
+ }
+ return e;
+}
+
void PeeringState::purge_strays()
{
if (is_premerge()) {
bool transaction_applied,
bool async);
+ /**
+ * retrieve the min last_backfill among backfill targets
+ */
+ hobject_t earliest_backfill() const;
+
+
/**
* Updates local log/missing to reflect new oob log update from primary
*/
}
}
-hobject_t PrimaryLogPG::earliest_backfill() const
-{
- hobject_t e = hobject_t::get_max();
- for (const pg_shard_t& bt : get_backfill_targets()) {
- const pg_info_t &pi = recovery_state.get_peer_info(bt);
- e = std::min(pi.last_backfill, e);
- }
- return e;
-}
-
/** do_op - do an op
* pg lock will be held (if multithreaded)
* osd_lock NOT held.
publish_stats_to_osd();
if (get_backfill_targets().size()) {
- last_backfill_started = earliest_backfill();
+ last_backfill_started = recovery_state.earliest_backfill();
new_backfill = true;
ceph_assert(!last_backfill_started.is_max());
dout(5) << __func__ << ": bft=" << get_backfill_targets()
// Initialize from prior backfill state
if (new_backfill) {
// on_activate() was called prior to getting here
- ceph_assert(last_backfill_started == earliest_backfill());
+ ceph_assert(last_backfill_started == recovery_state.earliest_backfill());
new_backfill = false;
// initialize BackfillIntervals
hobject_t next_backfill_to_complete = backfills_in_flight.empty() ?
backfill_pos : *(backfills_in_flight.begin());
- hobject_t new_last_backfill = earliest_backfill();
+ hobject_t new_last_backfill = recovery_state.earliest_backfill();
dout(10) << "starting new_last_backfill at " << new_last_backfill << dendl;
for (map<hobject_t, pg_stat_t>::iterator i =
pending_backfill_updates.begin();
void do_osd_op_effects(OpContext *ctx, const ConnectionRef& conn);
private:
int do_scrub_ls(const MOSDOp *op, OSDOp *osd_op);
- hobject_t earliest_backfill() const;
bool check_src_targ(const hobject_t& soid, const hobject_t& toid) const;
uint64_t temp_seq; ///< last id for naming temp objects