]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
journal: flush commit position on metadata shutdown 7385/head
authorMykola Golub <mgolub@mirantis.com>
Sun, 24 Jan 2016 10:26:36 +0000 (12:26 +0200)
committerMykola Golub <mgolub@mirantis.com>
Wed, 27 Jan 2016 19:45:20 +0000 (21:45 +0200)
A crash was observed on JournalTrimmer destroy, which was called
by the Journaler after metadata shutdown. JournalTrimmer destructor
also calls flush_commit_position, but at that time metadata m_timer
is already null and it crushed there.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
src/journal/JournalMetadata.cc

index 0cd935f2f2e026cb8566d9e4baa454c58d5768b1..e4833a1dc4d60a0246a0044b87a4a233784f5453 100644 (file)
@@ -74,6 +74,8 @@ void JournalMetadata::shutdown() {
     }
   }
 
+  flush_commit_position();
+
   if (m_timer != NULL) {
     Mutex::Locker locker(m_timer_lock);
     m_timer->shutdown();