From 45a556ad7dbf3fb8963b734de931cdb60ce09d0a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 31 Jul 2018 16:54:26 -0500 Subject: [PATCH] osd: no osd_lock for finish_splits 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 --- src/osd/OSD.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 073c90c66e0..022e2c46d5b 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -8035,7 +8035,6 @@ struct C_FinishSplits : public Context { void OSD::_finish_splits(set& pgs) { dout(10) << __func__ << " " << pgs << dendl; - Mutex::Locker l(osd_lock); if (is_stopping()) return; PG::RecoveryCtx rctx = create_context(); -- 2.39.5