Browse Source

Fix OSDs being unable to stop PGs that are 'peering', not 'active'

This was sometimes leading to incorrect misplaced and degraded object count statistics
Vitaliy Filippov 2 years ago
parent
commit
09b3e4e789
  1. 7
      src/osd_peering.cpp

7
src/osd_peering.cpp

@ -468,10 +468,15 @@ bool osd_t::stop_pg(pg_t & pg)
delete pg.peering_state;
pg.peering_state = NULL;
}
if (!(pg.state & PG_ACTIVE))
if (pg.state & PG_STOPPING)
{
return false;
}
if (!(pg.state & PG_ACTIVE))
{
finish_stop_pg(pg);
return true;
}
pg.state = pg.state & ~PG_ACTIVE | PG_STOPPING;
if (pg.inflight == 0 && !pg.flush_batch &&
// We must either forget all PG's unstable writes or wait for it to become clean

Loading…
Cancel
Save