We do not want to hold osd_lock while calling apply_transaction or else
we may cause a deadlock due to a completion event that needs osd_lock.
Also, we don't need to hold the lock here, so don't.
Signed-off-by: Sage Weil <sage@redhat.com>
SnapMapper::Scrubber s(cct, store, service.meta_ch,
make_snapmapper_oid());
clog->debug() << "purged_snaps scrub starts";
+ osd_lock.unlock();
s.run();
+ osd_lock.lock();
+ if (is_stopping()) {
+ return;
+ }
if (s.stray.size()) {
clog->debug() << "purged_snaps scrub find " << s.stray.size() << " strays";
} else {