[Pkg-ceph-commits] [ceph] 02/05: backported journal header fix
Dmitry Smirnov
onlyjob at moszumanska.debian.org
Mon Sep 15 19:45:53 UTC 2014
This is an automated email from the git hooks/post-receive script.
onlyjob pushed a commit to branch master
in repository ceph.
commit 3a15854
Author: Dmitry Smirnov <onlyjob at member.fsf.org>
Date: Mon Sep 15 17:39:11 2014
backported journal header fix
---
debian/patches/p2139.patch | 39 +++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 40 insertions(+)
diff --git a/debian/patches/p2139.patch b/debian/patches/p2139.patch
new file mode 100644
index 0000000..6886c6a
--- /dev/null
+++ b/debian/patches/p2139.patch
@@ -0,0 +1,39 @@
+From 4eb18dd487da4cb621dcbecfc475fc0871b356ac Mon Sep 17 00:00:00 2001
+From: Ma Jianpeng <jianpeng.ma at intel.com>
+Date: Wed, 23 Jul 2014 10:10:38 -0700
+Subject: [PATCH] os/FileJournal: Update the journal header when closing
+ journal
+
+When closing journal, it should check must_write_header and update
+journal header if must_write_header alreay set.
+It can reduce the nosense journal-replay after restarting osd.
+
+Signed-off-by: Ma Jianpeng <jianpeng.ma at intel.com>
+Reviewed-by: Sage Weil <sage at redhat.com>
+---
+ src/os/FileJournal.cc | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/src/os/FileJournal.cc
++++ b/src/os/FileJournal.cc
+@@ -543,8 +543,9 @@
+ stop_writer();
+
+ // close
+ assert(writeq_empty());
++ assert(!must_write_header);
+ assert(fd >= 0);
+ VOID_TEMP_FAILURE_RETRY(::close(fd));
+ fd = -1;
+ }
+@@ -1101,9 +1102,9 @@
+ dout(10) << "write_thread_entry start" << dendl;
+ while (1) {
+ {
+ Mutex::Locker locker(writeq_lock);
+- if (writeq.empty()) {
++ if (writeq.empty() && !must_write_header) {
+ if (write_stop)
+ break;
+ dout(20) << "write_thread_entry going to sleep" << dendl;
+ writeq_cond.Wait(writeq_lock);
diff --git a/debian/patches/series b/debian/patches/series
index b46c8ca..b0c3c61 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,6 +4,7 @@ bug-8342.patch
bug-8624a.patch
bug-8624b.patch
bug-8821.patch
+p2139.patch
client-sleep1.patch
client-sleep2.patch
client-sleep3.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ceph/ceph.git
More information about the Pkg-ceph-commits
mailing list