mirror of
https://github.com/ceph/ceph
synced 2024-12-30 07:23:11 +00:00
Merge pull request #3365 from liewegas/wip-peering
osd: new activating pg state between peering and active Reviewed-by: Samuel Just <sjust@redhat.com>
This commit is contained in:
commit
266cf2e5fa
@ -1688,6 +1688,8 @@ void PG::activate(ObjectStore::Transaction& t,
|
||||
state_set(PG_STATE_DEGRADED);
|
||||
state_set(PG_STATE_UNDERSIZED);
|
||||
}
|
||||
|
||||
state_set(PG_STATE_ACTIVATING);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1856,7 +1858,6 @@ void PG::all_activated_and_committed()
|
||||
state_clear(PG_STATE_CREATING);
|
||||
|
||||
share_pg_info();
|
||||
publish_stats_to_osd();
|
||||
|
||||
queue_peering_event(
|
||||
CephPeeringEvtRef(
|
||||
@ -6486,7 +6487,7 @@ boost::statechart::result PG::RecoveryState::Active::react(const AllReplicasActi
|
||||
{
|
||||
PG *pg = context< RecoveryMachine >().pg;
|
||||
all_replicas_activated = true;
|
||||
|
||||
pg->state_clear(PG_STATE_ACTIVATING);
|
||||
pg->state_set(PG_STATE_ACTIVE);
|
||||
|
||||
pg->check_local();
|
||||
@ -6509,6 +6510,7 @@ void PG::RecoveryState::Active::exit()
|
||||
|
||||
pg->backfill_reserved = false;
|
||||
pg->backfill_reserving = false;
|
||||
pg->state_clear(PG_STATE_ACTIVATING);
|
||||
pg->state_clear(PG_STATE_DEGRADED);
|
||||
pg->state_clear(PG_STATE_UNDERSIZED);
|
||||
pg->state_clear(PG_STATE_BACKFILL_TOOFULL);
|
||||
|
@ -700,6 +700,8 @@ std::string pg_state_string(int state)
|
||||
oss << "creating+";
|
||||
if (state & PG_STATE_ACTIVE)
|
||||
oss << "active+";
|
||||
if (state & PG_STATE_ACTIVATING)
|
||||
oss << "activating+";
|
||||
if (state & PG_STATE_CLEAN)
|
||||
oss << "clean+";
|
||||
if (state & PG_STATE_RECOVERY_WAIT)
|
||||
|
@ -767,6 +767,7 @@ inline ostream& operator<<(ostream& out, const osd_stat_t& s) {
|
||||
#define PG_STATE_BACKFILL_TOOFULL (1<<21) // backfill can't proceed: too full
|
||||
#define PG_STATE_RECOVERY_WAIT (1<<22) // waiting for recovery reservations
|
||||
#define PG_STATE_UNDERSIZED (1<<23) // pg acting < pool size
|
||||
#define PG_STATE_ACTIVATING (1<<24) // pg is peered but not yet active
|
||||
|
||||
std::string pg_state_string(int state);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user