From: Sage Weil Date: Fri, 1 May 2015 16:22:01 +0000 (-0700) Subject: Backport the merge commit of branch 'wip-journal-header' of git://github.com/XinzeChi... X-Git-Tag: v0.94.7~28^2~12^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=18c49b6474a563b5f7f7cef671050d46ac4c3c4f;p=ceph.git Backport the merge commit of branch 'wip-journal-header' of git://github.com/XinzeChi/ceph (cherry picked from commit 8d596bfa24c9c3e2aadbb87494284cb5fd824e55) Conflicts: src/os/FileJournal.cc (trivial) src/os/FileJournal.h (trivial) Renamed write_header() to write_header_sync() in a merge Signed-off-by: David Zafman --- diff --git a/src/os/FileJournal.cc b/src/os/FileJournal.cc index 1b04d8e27f67..49f4f507a960 100644 --- a/src/os/FileJournal.cc +++ b/src/os/FileJournal.cc @@ -649,9 +649,8 @@ void FileJournal::stop_writer() } 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 @@ -737,7 +736,7 @@ bufferptr FileJournal::prepare_header() return bp; } -void FileJournal::write_header() +void FileJournal::write_header_sync() { Mutex::Locker locker(write_lock); must_write_header = true; diff --git a/src/os/FileJournal.h b/src/os/FileJournal.h index 8aa04a9d93ac..430f773c83d8 100644 --- a/src/os/FileJournal.h +++ b/src/os/FileJournal.h @@ -414,7 +414,7 @@ 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; }