/*------Crashed-------*/
PG::RecoveryState::Crashed::Crashed(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Crashed")
{
- state_name = "Crashed";
context< RecoveryMachine >().log_enter(state_name);
assert(0 == "we got a bad state machine event");
}
/*------Initial-------*/
PG::RecoveryState::Initial::Initial(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Initial")
{
- state_name = "Initial";
context< RecoveryMachine >().log_enter(state_name);
}
/*------Started-------*/
PG::RecoveryState::Started::Started(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started")
{
- state_name = "Started";
context< RecoveryMachine >().log_enter(state_name);
}
/*--------Reset---------*/
PG::RecoveryState::Reset::Reset(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Reset")
{
- state_name = "Reset";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
pg->flushed = false;
/*-------Start---------*/
PG::RecoveryState::Start::Start(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Start")
{
- state_name = "Start";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
/*---------Primary--------*/
PG::RecoveryState::Primary::Primary(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary")
{
- state_name = "Started/Primary";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
assert(pg->want_acting.empty());
/*---------Peering--------*/
PG::RecoveryState::Peering::Peering(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct), flushed(false)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Peering"),
+ flushed(false)
{
- state_name = "Started/Primary/Peering";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
/*------Backfilling-------*/
PG::RecoveryState::Backfilling::Backfilling(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Active/Backfilling")
{
- state_name = "Started/Primary/Active/Backfilling";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
pg->backfill_reserved = true;
/*--WaitRemoteBackfillReserved--*/
PG::RecoveryState::WaitRemoteBackfillReserved::WaitRemoteBackfillReserved(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Active/WaitRemoteBackfillReserved")
{
- state_name = "Started/Primary/Active/WaitRemoteBackfillReserved";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
pg->state_set(PG_STATE_BACKFILL_WAIT);
/*--WaitLocalBackfillReserved--*/
PG::RecoveryState::WaitLocalBackfillReserved::WaitLocalBackfillReserved(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Active/WaitLocalBackfillReserved")
{
- state_name = "Started/Primary/Active/WaitLocalBackfillReserved";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
pg->state_set(PG_STATE_BACKFILL_WAIT);
/*----NotBackfilling------*/
PG::RecoveryState::NotBackfilling::NotBackfilling(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Active/NotBackfilling")
{
- state_name = "Started/Primary/Active/NotBackfilling";
context< RecoveryMachine >().log_enter(state_name);
}
/*---RepNotRecovering----*/
PG::RecoveryState::RepNotRecovering::RepNotRecovering(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/ReplicaActive/RepNotRecovering")
{
- state_name = "Started/ReplicaActive/RepNotRecovering";
context< RecoveryMachine >().log_enter(state_name);
}
/*---RepWaitRecoveryReserved--*/
PG::RecoveryState::RepWaitRecoveryReserved::RepWaitRecoveryReserved(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/ReplicaActive/RepWaitRecoveryReserved")
{
- state_name = "Started/ReplicaActive/RepWaitRecoveryReserved";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
/*-RepWaitBackfillReserved*/
PG::RecoveryState::RepWaitBackfillReserved::RepWaitBackfillReserved(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/ReplicaActive/RepWaitBackfillReserved")
{
- state_name = "Started/ReplicaActive/RepWaitBackfillReserved";
context< RecoveryMachine >().log_enter(state_name);
}
/*---RepRecovering-------*/
PG::RecoveryState::RepRecovering::RepRecovering(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/ReplicaActive/RepRecovering")
{
- state_name = "Started/ReplicaActive/RepRecovering";
context< RecoveryMachine >().log_enter(state_name);
}
/*------Activating--------*/
PG::RecoveryState::Activating::Activating(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Active/Activating")
{
- state_name = "Started/Primary/Active/Activating";
context< RecoveryMachine >().log_enter(state_name);
}
}
PG::RecoveryState::WaitLocalRecoveryReserved::WaitLocalRecoveryReserved(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Active/WaitLocalRecoveryReserved")
{
- state_name = "Started/Primary/Active/WaitLocalRecoveryReserved";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
pg->state_set(PG_STATE_RECOVERY_WAIT);
PG::RecoveryState::WaitRemoteRecoveryReserved::WaitRemoteRecoveryReserved(my_context ctx)
: my_base(ctx),
- NamedState(context< RecoveryMachine >().pg->cct),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Active/WaitRemoteRecoveryReserved"),
acting_osd_it(context< Active >().sorted_acting_set.begin())
{
- state_name = "Started/Primary/Active/WaitRemoteRecoveryReserved";
context< RecoveryMachine >().log_enter(state_name);
post_event(RemoteRecoveryReserved());
}
}
PG::RecoveryState::Recovering::Recovering(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Active/Recovering")
{
- state_name = "Started/Primary/Active/Recovering";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
}
PG::RecoveryState::Recovered::Recovered(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Active/Recovered")
{
int newest_update_osd;
- state_name = "Started/Primary/Active/Recovered";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
}
PG::RecoveryState::Clean::Clean(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Active/Clean")
{
- state_name = "Started/Primary/Active/Clean";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
/*---------Active---------*/
PG::RecoveryState::Active::Active(my_context ctx)
: my_base(ctx),
- NamedState(context< RecoveryMachine >().pg->cct),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Active"),
sorted_acting_set(context< RecoveryMachine >().pg->acting.begin(),
context< RecoveryMachine >().pg->acting.end()),
all_replicas_activated(false)
{
- state_name = "Started/Primary/Active";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
/*------ReplicaActive-----*/
PG::RecoveryState::ReplicaActive::ReplicaActive(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/ReplicaActive")
{
- state_name = "Started/ReplicaActive";
-
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
/*-------Stray---*/
PG::RecoveryState::Stray::Stray(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct) {
- state_name = "Started/Stray";
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Stray")
+{
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
/*--------GetInfo---------*/
PG::RecoveryState::GetInfo::GetInfo(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Peering/GetInfo")
{
- state_name = "Started/Primary/Peering/GetInfo";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
}
/*------GetLog------------*/
-PG::RecoveryState::GetLog::GetLog(my_context ctx) :
- my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct), newest_update_osd(-1), msg(0)
+PG::RecoveryState::GetLog::GetLog(my_context ctx)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Peering/GetLog"),
+ newest_update_osd(-1), msg(0)
{
- state_name = "Started/Primary/Peering/GetLog";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
/*------WaitActingChange--------*/
PG::RecoveryState::WaitActingChange::WaitActingChange(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Peering/WaitActingChange")
{
- state_name = "Started/Primary/Peering/WaitActingChange";
context< RecoveryMachine >().log_enter(state_name);
}
/*------Incomplete--------*/
PG::RecoveryState::Incomplete::Incomplete(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Peering/Incomplete")
{
- state_name = "Started/Primary/Peering/Incomplete";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
/*------GetMissing--------*/
PG::RecoveryState::GetMissing::GetMissing(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Peering/GetMissing")
{
- state_name = "Started/Primary/Peering/GetMissing";
context< RecoveryMachine >().log_enter(state_name);
PG *pg = context< RecoveryMachine >().pg;
/*---WaitFlushedPeering---*/
PG::RecoveryState::WaitFlushedPeering::WaitFlushedPeering(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Peering/WaitFlushedPeering")
{
- state_name = "Started/Primary/Peering/WaitFlushedPeering";
PG *pg = context< RecoveryMachine >().pg;
context< RecoveryMachine >().log_enter(state_name);
if (context< RecoveryMachine >().pg->flushed)
/*------WaitUpThru--------*/
PG::RecoveryState::WaitUpThru::WaitUpThru(my_context ctx)
- : my_base(ctx), NamedState(context< RecoveryMachine >().pg->cct)
+ : my_base(ctx),
+ NamedState(context< RecoveryMachine >().pg->cct, "Started/Primary/Peering/WaitUpThru")
{
- state_name = "Started/Primary/Peering/WaitUpThru";
context< RecoveryMachine >().log_enter(state_name);
}