---
...he-Fix-an-infinite-loop-in-journal-replay.patch | 40 ++++++++++++++++++++++
series.conf | 1 +
2 files changed, 41 insertions(+)
create mode 100644 patches.fixes/0008-bcache-Fix-an-infinite-loop-in-journal-replay.patch
diff --git a/patches.fixes/0008-bcache-Fix-an-infinite-loop-in-journal-replay.patch b/patches.fixes/0008-bcache-Fix-an-infinite-loop-in-journal-replay.patch
new file mode 100644
index 0000000..4369af5
--- /dev/null
+++ b/patches.fixes/0008-bcache-Fix-an-infinite-loop-in-journal-replay.patch
@@ -0,0 +1,40 @@
+From 16ed6ee968e78f94e15d23062cfc1c55f38d2eca Mon Sep 17 00:00:00 2001
+From: Kent Overstreet
+Date: Mon, 2 Jun 2014 15:39:44 -0700
+Subject: [PATCH 08/14] bcache: Fix an infinite loop in journal replay
+Git-commit: 6b708de64adb6dc8319e7aeac922b46904fbeeec
+Patch-mainline: v3.17
+References: bnc#908603
+
+When running with multiple cache devices, if one of the devices has a completely
+empty journal but we'd already found some journal entries on a previosu device
+we'd go into an infinite loop.
+
+Change-Id: I1dcdc0d738192746de28f40e8b08825b0dea5e2b
+Signed-off-by: Kent Overstreet
+Signed-off-by: Joshua Schmid
+---
+ drivers/md/bcache/journal.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c
+index ead001c..fe080ad 100644
+--- a/drivers/md/bcache/journal.c
++++ b/drivers/md/bcache/journal.c
+@@ -190,9 +190,12 @@ int bch_journal_read(struct cache_set *c, struct list_head *list)
+ if (read_bucket(l))
+ goto bsearch;
+
+- if (list_empty(list))
++ /* no journal entries on this device? */
++ if (l == ca->sb.njournal_buckets)
+ continue;
+ bsearch:
++ BUG_ON(list_empty(list));
++
+ /* Binary search */
+ m = l;
+ r = find_next_bit(bitmap, ca->sb.njournal_buckets, l + 1);
+--
+2.1.2
+
diff --git a/series.conf b/series.conf
index 0101241..dfca269 100644
--- a/series.conf
+++ b/series.conf
@@ -428,6 +428,7 @@
patches.fixes/0005-bcache-fix-crash-on-shutdown-in-passthrough-mode.patch
patches.fixes/0006-bcache-Make-sure-to-pass-GFP_WAIT-to-mempool_alloc.patch
patches.fixes/0007-bcache-fix-typo-in-bch_bkey_equal_header.patch
+ patches.fixes/0008-bcache-Fix-an-infinite-loop-in-journal-replay.patch
########################################################
# DRM/Video
--
2.1.2
--
To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org
To contact the owner, e-mail: opensuse-kernel+owner@opensuse.org