]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
journal: disconnect watch after watch error 7113/head
authorJason Dillaman <dillaman@redhat.com>
Tue, 5 Jan 2016 04:13:16 +0000 (23:13 -0500)
committerJason Dillaman <dillaman@redhat.com>
Tue, 5 Jan 2016 04:13:16 +0000 (23:13 -0500)
Fixes: #14168
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/journal/JournalMetadata.cc

index 90363c25b7dbfccc83d1ca3a7d51c2f1f680b849..0cd935f2f2e026cb8566d9e4baa454c58d5768b1 100644 (file)
@@ -364,6 +364,13 @@ void JournalMetadata::handle_watch_error(int err) {
   lderr(m_cct) << "journal watch error: " << cpp_strerror(err) << dendl;
   Mutex::Locker timer_locker(m_timer_lock);
   Mutex::Locker locker(m_lock);
+
+  // release old watch on error
+  if (m_watch_handle != 0) {
+    m_ioctx.unwatch2(m_watch_handle);
+    m_watch_handle = 0;
+  }
+
   if (m_initialized && err != -ENOENT) {
     schedule_watch_reset();
   }