]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd/SnapMapper: reset iterators at finish of run()
authorSage Weil <sage@redhat.com>
Tue, 9 Jul 2019 17:03:35 +0000 (12:03 -0500)
committerSage Weil <sage@redhat.com>
Tue, 9 Jul 2019 17:03:35 +0000 (12:03 -0500)
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 <sage@redhat.com>
src/osd/SnapMapper.cc

index 02553af8e4b4548e256111cb304fd96882f44eb1..b6eb7ec4b0aec464703fc09188396f7cfaf6193a 100644 (file)
@@ -623,6 +623,8 @@ void SnapMapper::Scrubber::run()
   }
 
   dout(10) << __func__ << " end, found " << stray.size() << " stray" << dendl;
+  psit = ObjectMap::ObjectMapIterator();
+  mapit = ObjectMap::ObjectMapIterator();
 }