This used to protect the pg registration probably? There is no need for
it now.
More importantly, having it here can cause a deadlock when we are holding
osd_lock and blocking on wait_min_pg_epoch(), because a PG may need to
finish splitting to advance and then merge with a peer. (The wait won't
block on *this* PG since it isn't registered in the shard yet, but it
will block on the merge peer.)
Signed-off-by: Sage Weil <sage@redhat.com>
void OSD::_finish_splits(set<PGRef>& pgs)
{
dout(10) << __func__ << " " << pgs << dendl;
- Mutex::Locker l(osd_lock);
if (is_stopping())
return;
PG::RecoveryCtx rctx = create_context();