Fix OSDs being unable to stop PGs that are 'peering', not 'active'
This was sometimes leading to incorrect misplaced and degraded object count statistics
parent
07912fd670
commit
09b3e4e789
|
@ -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…
Reference in New Issue