summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2019-08-02 00:41:30 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2019-08-02 00:41:30 -0400
commit22c48281c60e7b160c3392731d73d62d33361155 (patch)
tree31d243b1430e419b9f06a4a9b08b4fc2f133fc05
parent05dd6a126c85d26f83048865ac6d0f7a425d353c (diff)
downloadlongterm-queue-4.18-22c48281c60e7b160c3392731d73d62d33361155.tar.gz
bcache: another ctxt refresh
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--queue/bcache-add-failure-check-to-run_cache_set-for-journa.patch15
1 files changed, 9 insertions, 6 deletions
diff --git a/queue/bcache-add-failure-check-to-run_cache_set-for-journa.patch b/queue/bcache-add-failure-check-to-run_cache_set-for-journa.patch
index 04e68dd..a9a086c 100644
--- a/queue/bcache-add-failure-check-to-run_cache_set-for-journa.patch
+++ b/queue/bcache-add-failure-check-to-run_cache_set-for-journa.patch
@@ -1,4 +1,4 @@
-From ce3e4cfb59cb382f8e5ce359238aa580d4ae7778 Mon Sep 17 00:00:00 2001
+From 96919b6d22af6a667d69e0a1b4d384e823191681 Mon Sep 17 00:00:00 2001
From: Coly Li <colyli@suse.de>
Date: Thu, 25 Apr 2019 00:48:34 +0800
Subject: [PATCH] bcache: add failure check to run_cache_set() for journal
@@ -31,10 +31,10 @@ Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
-index 53c5e3e0ac22..8c7fdada0acf 100644
+index f78916eb95af..cdc432db330c 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
-@@ -1773,7 +1773,7 @@ err:
+@@ -1744,7 +1744,7 @@ struct cache_set *bch_cache_set_alloc(struct cache_sb *sb)
return NULL;
}
@@ -43,7 +43,7 @@ index 53c5e3e0ac22..8c7fdada0acf 100644
{
const char *err = "cannot allocate memory";
struct cached_dev *dc, *t;
-@@ -1867,7 +1867,9 @@ static void run_cache_set(struct cache_set *c)
+@@ -1838,7 +1838,9 @@ static void run_cache_set(struct cache_set *c)
if (j->version < BCACHE_JSET_VERSION_UUID)
__uuid_write(c);
@@ -54,13 +54,16 @@ index 53c5e3e0ac22..8c7fdada0acf 100644
} else {
pr_notice("invalidating existing data");
-@@ -1935,11 +1937,13 @@ static void run_cache_set(struct cache_set *c)
+@@ -1906,7 +1908,7 @@ static void run_cache_set(struct cache_set *c)
flash_devs_run(c);
set_bit(CACHE_SET_RUNNING, &c->flags);
- return;
+ return 0;
err:
+ while (!list_empty(&journal)) {
+ l = list_first_entry(&journal, struct journal_replay, list);
+@@ -1917,6 +1919,8 @@ static void run_cache_set(struct cache_set *c)
closure_sync(&cl);
/* XXX: test this, it's broken */
bch_cache_set_error(c, "%s", err);
@@ -69,7 +72,7 @@ index 53c5e3e0ac22..8c7fdada0acf 100644
}
static bool can_attach_cache(struct cache *ca, struct cache_set *c)
-@@ -2003,8 +2007,11 @@ found:
+@@ -1980,8 +1984,11 @@ static const char *register_cache_set(struct cache *ca)
ca->set->cache[ca->sb.nr_this_dev] = ca;
c->cache_by_alloc[c->caches_loaded++] = ca;