commit_cond.Signal();
}
write_thread.join();
-
- // write jouranl header right now, so that
- // committed_up_to in journal header is newer enough.
- write_header();
+
++ // write journal header now so that we have less to replay on remount
++ write_header_sync();
+
#ifdef HAVE_LIBAIO
// stop aio completeion thread *after* writer thread has stopped
// and has submitted all of its io
return bp;
}
-
-void FileJournal::write_header()
++void FileJournal::write_header_sync()
+ {
+ Mutex::Locker locker(write_lock);
+ must_write_header = true;
+ bufferlist bl;
+ do_write(bl);
+ dout(20) << __func__ << " finish" << dendl;
+ }
int FileJournal::check_for_full(uint64_t seq, off64_t pos, off64_t size)
{