From: Sage Weil Date: Mon, 20 Feb 2012 22:41:28 +0000 (-0800) Subject: osd: sched_scrub() outside of map_lock X-Git-Tag: v0.43~52 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4d3de03811a54637786f67119d41e852f578e203;p=ceph.git osd: sched_scrub() outside of map_lock Inside sched_scrub() we call _lookup_lock_pg(), which takes map_lock.get_read(). That's technically okay because RWLock read side is recursive, but lockdep doesn't know that, and we don't need map_lock because we hold osd_lock. Signed-off-by: Sage Weil --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 402e11724a3..b11f906a272 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -1762,12 +1762,12 @@ void OSD::tick() // periodically kick recovery work queue recovery_tp.kick(); - map_lock.get_read(); - if (scrub_should_schedule()) { sched_scrub(); } + map_lock.get_read(); + heartbeat_lock.Lock(); heartbeat_check(); heartbeat_lock.Unlock();