osd: do not hold osd_lock while queueing stray purged_snaps

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2019-07-09 08:12:04 -05:00
parent 8bd7aa50cd
commit 9e41cecf71

View File

@ -6646,10 +6646,6 @@ void OSD::scrub_purged_snaps()
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 {
@ -6681,6 +6677,10 @@ void OSD::scrub_purged_snaps()
pg->queue_snap_retrim(snap);
pg->unlock();
}
osd_lock.Lock();
if (is_stopping()) {
return;
}
dout(10) << __func__ << " done queueing pgs, updating superblock" << dendl;
ObjectStore::Transaction t;
superblock.last_purged_snaps_scrub = ceph_clock_now();