]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge branch 'wip-journal-header' of git://github.com/XinzeChi/ceph
authorSage Weil <sage@redhat.com>
Fri, 1 May 2015 16:22:01 +0000 (09:22 -0700)
committerSage Weil <sage@redhat.com>
Fri, 1 May 2015 16:22:01 +0000 (09:22 -0700)
Conflicts:
src/gmock

1  2 
src/os/FileJournal.cc
src/os/FileJournal.h

index c6bb6f2c0755d870f01c276783906ec3b5d77114,1b04d8e27f671a0038a02c96294b6c3bfba953ea..7e84e05a29fa63bc5ea584a96345d8c1d01d6dae
@@@ -648,7 -648,11 +648,10 @@@ void FileJournal::stop_writer(
      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
@@@ -733,7 -737,14 +736,14 @@@ bufferptr FileJournal::prepare_header(
    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)
  {
index 574c902a68bb973235be70c20e7a822d44286e14,8aa04a9d93ac45909bb90a6410261408986caf5c..430f773c83d828f98974d3efdd3268e066ba4b9f
@@@ -414,6 -414,8 +414,8 @@@ private
      return full_state != FULL_NOTFULL && !write_stop;
    }
  
 -  void write_header();
++  void write_header_sync();
    void set_wait_on_full(bool b) { wait_on_full = b; }
  
    // reads