]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd: no osd_lock for finish_splits
authorSage Weil <sage@redhat.com>
Tue, 31 Jul 2018 21:54:26 +0000 (16:54 -0500)
committerSage Weil <sage@redhat.com>
Fri, 7 Sep 2018 17:09:05 +0000 (12:09 -0500)
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>
src/osd/OSD.cc

index 073c90c66e08a81fadd9a49330db241ff0435d21..022e2c46d5b67ccaaef8d4b1fb2b9c8478fed1c6 100644 (file)
@@ -8035,7 +8035,6 @@ struct C_FinishSplits : public Context {
 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();