Allow to enable PG locks online when changing local_reads in pool configuration

This commit is contained in:
Vitaliy Filippov
2025-05-23 20:54:47 +03:00
parent 2b0a802ea1
commit 438b64f6c3
4 changed files with 24 additions and 11 deletions
+15 -10
View File
@@ -104,21 +104,26 @@ void osd_t::repeer_pgs(osd_num_t peer_osd)
{
// Repeer this pg
printf("[PG %u/%u] Repeer because of OSD %ju\n", pg.pool_id, pg.pg_num, peer_osd);
if (!(pg.state & (PG_ACTIVE | PG_REPEERING)) || pg.can_repeer())
{
start_pg_peering(pg);
}
else
{
// Stop accepting new operations, wait for current ones to finish or fail
pg.state = pg.state & ~PG_ACTIVE | PG_REPEERING;
report_pg_state(pg);
}
repeer_pg(pg);
}
}
}
}
void osd_t::repeer_pg(pg_t & pg)
{
if (!(pg.state & (PG_ACTIVE | PG_REPEERING)) || pg.can_repeer())
{
start_pg_peering(pg);
}
else
{
// Stop accepting new operations, wait for current ones to finish or fail
pg.state = pg.state & ~PG_ACTIVE | PG_REPEERING;
report_pg_state(pg);
}
}
// Reset PG state (when peering or stopping)
void osd_t::reset_pg(pg_t & pg)
{