]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
filestore: stop sync thread before journal
authorSage Weil <sage@newdream.net>
Wed, 27 May 2009 17:43:25 +0000 (10:43 -0700)
committerSage Weil <sage@newdream.net>
Wed, 27 May 2009 17:43:25 +0000 (10:43 -0700)
Otherwise we get sync thread interaction with freed journal.

src/os/FileJournal.cc
src/os/FileStore.cc

index c832cc5e5a5a64c8ab76df05a3ba478cc7d5066e..7d1e89a2cbf2b4e2c2684150413d45db2c95fe70 100644 (file)
@@ -24,7 +24,7 @@
 
 #define DOUT_SUBSYS journal
 #undef dout_prefix
-#define dout_prefix *_dout << dbeginl << "journal "
+#define dout_prefix *_dout << dbeginl << pthread_self() << " journal "
 
 
 int FileJournal::_open(bool forwrite, bool create)
index ab751f200a9177752bcf99ccd7eff0d1d26e8ec0..f7f537397a370fab8e16c77579fa0d044444de5d 100644 (file)
@@ -477,7 +477,6 @@ int FileStore::umount()
   dout(5) << "umount " << basedir << dendl;
   
   sync();
-  journal_stop();
 
   lock.Lock();
   stop = true;
@@ -485,6 +484,8 @@ int FileStore::umount()
   lock.Unlock();
   sync_thread.join();
 
+  journal_stop();
+
   ::close(fsid_fd);
   ::close(op_fd);