diff --git a/src/osd_peering.cpp b/src/osd_peering.cpp index 092af810..8928a398 100644 --- a/src/osd_peering.cpp +++ b/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