]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-mirror: avoid recursive lock in timer 7958/head
authorMykola Golub <mgolub@mirantis.com>
Mon, 7 Mar 2016 11:14:15 +0000 (13:14 +0200)
committerMykola Golub <mgolub@mirantis.com>
Mon, 7 Mar 2016 13:05:18 +0000 (15:05 +0200)
m_lock is used both by m_timer and refresh_images(), which is
scheduled by the timer, so run it with `safe_callbacks = false`.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
src/tools/rbd_mirror/PoolWatcher.cc

index ea05584365dbb3641622fcc79270988937570564..8029c07f8040bb0e78578e32d78a3f149cb677ee 100644 (file)
@@ -36,7 +36,7 @@ PoolWatcher::PoolWatcher(RadosRef cluster, double interval_seconds,
   m_refresh_cond(cond),
   m_stopping(false),
   m_cluster(cluster),
-  m_timer(g_ceph_context, m_lock),
+  m_timer(g_ceph_context, m_lock, false),
   m_interval(interval_seconds)
 {
   m_timer.init();