Add a new recovery_pg_switch setting to mix all PGs during recovery

This commit is contained in:
Vitaliy Filippov
2022-12-30 02:03:33 +03:00
parent d7bd36dc32
commit 998e24adf8
8 changed files with 98 additions and 25 deletions
+9
View File
@@ -32,7 +32,16 @@ void osd_t::handle_peers()
if (p.second.state & PG_HAS_UNCLEAN)
peering_state = peering_state | OSD_FLUSHING_PGS;
else if (p.second.state & (PG_HAS_DEGRADED | PG_HAS_MISPLACED))
{
peering_state = peering_state | OSD_RECOVERING;
if (p.second.state & PG_HAS_DEGRADED)
{
// Restart recovery from degraded objects
recovery_last_degraded = true;
recovery_last_pg = {};
recovery_last_oid = {};
}
}
ringloop->wakeup();
return;
}