From f7607512fee4967e027337159cbd81d7bea86385 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 9 Jul 2019 12:03:35 -0500 Subject: [PATCH] osd/SnapMapper: reset iterators at finish of run() These iterators implicitly hold locks in FileStore, which can lead to a deadlock if they are still alive and the caller tries to take new locks. Signed-off-by: Sage Weil --- src/osd/SnapMapper.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/osd/SnapMapper.cc b/src/osd/SnapMapper.cc index 02553af8e4b..b6eb7ec4b0a 100644 --- a/src/osd/SnapMapper.cc +++ b/src/osd/SnapMapper.cc @@ -623,6 +623,8 @@ void SnapMapper::Scrubber::run() } dout(10) << __func__ << " end, found " << stray.size() << " stray" << dendl; + psit = ObjectMap::ObjectMapIterator(); + mapit = ObjectMap::ObjectMapIterator(); } -- 2.39.5