diff options
author | Coly Li <colyli@suse.de> | 2019-06-01 23:19:33 +0800 |
---|---|---|
committer | Coly Li <colyli@suse.de> | 2019-06-01 23:19:33 +0800 |
commit | 1df5c802b9a8541fce36bc0b9de7f917eb9e333e (patch) | |
tree | 6486822ce07dcc6ae3557542224c0e2c2fa27546 | |
parent | 8479501eb4cd3b58fd48348628bf95c084aff133 (diff) | |
download | bcache-patches-1df5c802b9a8541fce36bc0b9de7f917eb9e333e.tar.gz |
for-next: update patches
17 files changed, 84 insertions, 33 deletions
diff --git a/for-next/0000-cover-letter.patch b/for-next/0000-cover-letter.patch index 5ab74df..257ce2f 100644 --- a/for-next/0000-cover-letter.patch +++ b/for-next/0000-cover-letter.patch @@ -1,6 +1,6 @@ -From 8585e338c7efee4a9ab805c322f0e6a828e01eb6 Mon Sep 17 00:00:00 2001 +From 70c844adf6eae686240977f5c733a993a709b173 Mon Sep 17 00:00:00 2001 From: Coly Li <colyli@suse.de> -Date: Sat, 1 Jun 2019 01:59:18 +0800 +Date: Sat, 1 Jun 2019 23:15:06 +0800 Subject: [PATCH 00/24] *** SUBJECT HERE *** *** BLURB HERE *** @@ -37,16 +37,16 @@ Coly Li (23): drivers/md/bcache/alloc.c | 9 ++ drivers/md/bcache/bcache.h | 5 +- - drivers/md/bcache/bset.c | 48 +++------ + drivers/md/bcache/bset.c | 48 ++------- drivers/md/bcache/btree.c | 19 +++- drivers/md/bcache/btree.h | 2 + drivers/md/bcache/io.c | 12 +++ - drivers/md/bcache/journal.c | 236 +++++++++++++++++++------------------------- + drivers/md/bcache/journal.c | 237 ++++++++++++++++++++------------------------ drivers/md/bcache/journal.h | 4 + drivers/md/bcache/super.c | 186 ++++++++++++++++++++++++++++++---- drivers/md/bcache/sysfs.c | 58 +++++++---- drivers/md/bcache/util.h | 2 - - 11 files changed, 365 insertions(+), 216 deletions(-) + 11 files changed, 366 insertions(+), 216 deletions(-) -- 2.16.4 diff --git a/for-next/0010-bcache-add-return-value-check-to-bch_cached_dev_run.patch b/for-next/0010-bcache-add-return-value-check-to-bch_cached_dev_run.patch index 7182104..a4aecac 100644 --- a/for-next/0010-bcache-add-return-value-check-to-bch_cached_dev_run.patch +++ b/for-next/0010-bcache-add-return-value-check-to-bch_cached_dev_run.patch @@ -1,4 +1,4 @@ -From 081cba7b68434f2ec2c15d61d54cd8957af3de3d Mon Sep 17 00:00:00 2001 +From d4d152860628f81b058c84f759fe74b635998204 Mon Sep 17 00:00:00 2001 From: Coly Li <colyli@suse.de> Date: Tue, 21 May 2019 22:16:38 +0800 Subject: [PATCH 10/24] bcache: add return value check to bch_cached_dev_run() @@ -27,7 +27,7 @@ index e30a983a68cd..cb268d7c6cea 100644 void bch_cache_set_unregister(struct cache_set *c); diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c -index 962c53493cf0..cb9abfa73d02 100644 +index 962c53493cf0..8bc5c55d0ee2 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -910,7 +910,7 @@ static int cached_dev_status_update(void *arg) @@ -90,7 +90,7 @@ index 962c53493cf0..cb9abfa73d02 100644 - bch_cached_dev_run(dc); + ret = bch_cached_dev_run(dc); -+ if (ret) { ++ if (ret && (ret != -EBUSY)) { + up_write(&dc->writeback_lock); + return ret; + } diff --git a/for-next/0011-bcache-remove-unncessary-code-in-bch_btree_keys_init.patch b/for-next/0011-bcache-remove-unncessary-code-in-bch_btree_keys_init.patch index 7ee9d27..7d77e79 100644 --- a/for-next/0011-bcache-remove-unncessary-code-in-bch_btree_keys_init.patch +++ b/for-next/0011-bcache-remove-unncessary-code-in-bch_btree_keys_init.patch @@ -1,4 +1,4 @@ -From 441011bbed2c8faeb3ffad6e7e06bae5fce9bb93 Mon Sep 17 00:00:00 2001 +From 916a60181db538619e372a4f76e5a01120478b79 Mon Sep 17 00:00:00 2001 From: Coly Li <colyli@suse.de> Date: Tue, 21 May 2019 22:36:35 +0800 Subject: [PATCH 11/24] bcache: remove unncessary code in bch_btree_keys_init() diff --git a/for-next/0012-bcache-avoid-a-deadlock-in-bcache_reboot.patch b/for-next/0012-bcache-avoid-a-deadlock-in-bcache_reboot.patch index 42fa920..db6b60a 100644 --- a/for-next/0012-bcache-avoid-a-deadlock-in-bcache_reboot.patch +++ b/for-next/0012-bcache-avoid-a-deadlock-in-bcache_reboot.patch @@ -1,4 +1,4 @@ -From dd0e776003b918dc95081486c6e4312404b94bc9 Mon Sep 17 00:00:00 2001 +From 24ed0f75355d3f51fb5f607ca0a5efa49cd2865d Mon Sep 17 00:00:00 2001 From: Coly Li <colyli@suse.de> Date: Tue, 21 May 2019 23:19:55 +0800 Subject: [PATCH 12/24] bcache: avoid a deadlock in bcache_reboot() @@ -45,7 +45,7 @@ Signed-off-by: Coly Li <colyli@suse.de> 2 files changed, 60 insertions(+), 1 deletion(-) diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c -index cb9abfa73d02..f445ddd74688 100644 +index 8bc5c55d0ee2..c5b810b7daa2 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -40,6 +40,7 @@ static const char invalid_uuid[] = { diff --git a/for-next/0013-bcache-check-CACHE_SET_IO_DISABLE-in-allocator-code.patch b/for-next/0013-bcache-check-CACHE_SET_IO_DISABLE-in-allocator-code.patch index cb3b157..f64e6e4 100644 --- a/for-next/0013-bcache-check-CACHE_SET_IO_DISABLE-in-allocator-code.patch +++ b/for-next/0013-bcache-check-CACHE_SET_IO_DISABLE-in-allocator-code.patch @@ -1,4 +1,4 @@ -From b7993efc5b71f776900110639f0afb91aed81298 Mon Sep 17 00:00:00 2001 +From 974ca7d3b33caa95d09f0cd322a2ac18c35aceab Mon Sep 17 00:00:00 2001 From: Coly Li <colyli@suse.de> Date: Wed, 22 May 2019 21:55:09 +0800 Subject: [PATCH 13/24] bcache: check CACHE_SET_IO_DISABLE in allocator code diff --git a/for-next/0014-bcache-check-CACHE_SET_IO_DISABLE-bit-in-bch_journal.patch b/for-next/0014-bcache-check-CACHE_SET_IO_DISABLE-bit-in-bch_journal.patch index 568cb7d..b756b6c 100644 --- a/for-next/0014-bcache-check-CACHE_SET_IO_DISABLE-bit-in-bch_journal.patch +++ b/for-next/0014-bcache-check-CACHE_SET_IO_DISABLE-bit-in-bch_journal.patch @@ -1,4 +1,4 @@ -From 2dbf0f5e0632818172cdb29260393c06a4af16f4 Mon Sep 17 00:00:00 2001 +From a4dddcfd815a1be25609f24ebe7adb9d5cc557a2 Mon Sep 17 00:00:00 2001 From: Coly Li <colyli@suse.de> Date: Wed, 22 May 2019 22:06:21 +0800 Subject: [PATCH 14/24] bcache: check CACHE_SET_IO_DISABLE bit in bch_journal() diff --git a/for-next/0015-bcache-add-pendings_cleanup-to-stop-pending-bcache-d.patch b/for-next/0015-bcache-add-pendings_cleanup-to-stop-pending-bcache-d.patch index ac5c029..d62fd36 100644 --- a/for-next/0015-bcache-add-pendings_cleanup-to-stop-pending-bcache-d.patch +++ b/for-next/0015-bcache-add-pendings_cleanup-to-stop-pending-bcache-d.patch @@ -1,4 +1,4 @@ -From e2831155f03fb4ad28b7ca372ffc9c1fbb53c625 Mon Sep 17 00:00:00 2001 +From d74e26115a7498d8d1f3e28b7bc77a6ff807ae80 Mon Sep 17 00:00:00 2001 From: Coly Li <colyli@suse.de> Date: Wed, 20 Mar 2019 23:11:59 +0800 Subject: [PATCH 15/24] bcache: add pendings_cleanup to stop pending bcache @@ -20,7 +20,7 @@ Signed-off-by: Coly Li <colyli@suse.de> 1 file changed, 55 insertions(+) diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c -index f445ddd74688..604560f7d73c 100644 +index c5b810b7daa2..5173957068ff 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -2277,9 +2277,13 @@ static int register_cache(struct cache_sb *sb, struct page *sb_page, diff --git a/for-next/0016-bcache-add-code-comments-for-journal_read_bucket.patch b/for-next/0016-bcache-add-code-comments-for-journal_read_bucket.patch index b75672c..7449713 100644 --- a/for-next/0016-bcache-add-code-comments-for-journal_read_bucket.patch +++ b/for-next/0016-bcache-add-code-comments-for-journal_read_bucket.patch @@ -1,4 +1,4 @@ -From 5741296b4f2dbfaaeb4a91214dcf20091e89f3e7 Mon Sep 17 00:00:00 2001 +From 62c92a9f753c62cb0da8d995476c1c201c74e862 Mon Sep 17 00:00:00 2001 From: Coly Li <colyli@suse.de> Date: Thu, 30 May 2019 18:39:17 +0800 Subject: [PATCH 16/24] bcache: add code comments for journal_read_bucket() diff --git a/for-next/0017-bcache-set-largest-seq-to-ja-seq-bucket_index-in-jou.patch b/for-next/0017-bcache-set-largest-seq-to-ja-seq-bucket_index-in-jou.patch index 1e42a69..449fb4b 100644 --- a/for-next/0017-bcache-set-largest-seq-to-ja-seq-bucket_index-in-jou.patch +++ b/for-next/0017-bcache-set-largest-seq-to-ja-seq-bucket_index-in-jou.patch @@ -1,4 +1,4 @@ -From 6e83f679e964497f149d51ce48662ff675df13fd Mon Sep 17 00:00:00 2001 +From 758c7b3925b7624e14ce8d91cc99ee6ad1cf80b4 Mon Sep 17 00:00:00 2001 From: Coly Li <colyli@suse.de> Date: Thu, 30 May 2019 18:40:37 +0800 Subject: [PATCH 17/24] bcache: set largest seq to ja->seq[bucket_index] in diff --git a/for-next/0018-bcache-simplify-bch_journal_read.patch b/for-next/0018-bcache-simplify-bch_journal_read.patch index 7db4a5f..797c3e6 100644 --- a/for-next/0018-bcache-simplify-bch_journal_read.patch +++ b/for-next/0018-bcache-simplify-bch_journal_read.patch @@ -1,4 +1,4 @@ -From 3dca98e14f448281a6db670e837b6bbb4b631e40 Mon Sep 17 00:00:00 2001 +From 4091d52af8763f685e9a4cf0fae43d7a5c73a8fe Mon Sep 17 00:00:00 2001 From: Coly Li <colyli@suse.de> Date: Thu, 30 May 2019 21:52:50 +0800 Subject: [PATCH 18/24] bcache: simplify bch_journal_read() diff --git a/for-next/0019-bcache-shrink-btree-node-cache-after-bch_btree_check.patch b/for-next/0019-bcache-shrink-btree-node-cache-after-bch_btree_check.patch index 6910a91..331bf0c 100644 --- a/for-next/0019-bcache-shrink-btree-node-cache-after-bch_btree_check.patch +++ b/for-next/0019-bcache-shrink-btree-node-cache-after-bch_btree_check.patch @@ -1,4 +1,4 @@ -From 26e96ad3af3dbc52d4e94a52eb3e67ea019e6800 Mon Sep 17 00:00:00 2001 +From d54ed8f395d3bbb0d959e7d2bc8dcd81aa395cb4 Mon Sep 17 00:00:00 2001 From: Coly Li <colyli@suse.de> Date: Fri, 31 May 2019 17:29:56 +0800 Subject: [PATCH 19/24] bcache: shrink btree node cache after bch_btree_check() @@ -12,7 +12,7 @@ Signed-off-by: Coly Li <colyli@suse.de> 1 file changed, 18 insertions(+) diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c -index 604560f7d73c..30e11d52c14e 100644 +index 5173957068ff..2c1d56c205d4 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -1875,6 +1875,24 @@ static int run_cache_set(struct cache_set *c) diff --git a/for-next/0020-bcache-more-detailed-error-message-to-bcache_device_.patch b/for-next/0020-bcache-more-detailed-error-message-to-bcache_device_.patch index 1123a5e..2c3d5e9 100644 --- a/for-next/0020-bcache-more-detailed-error-message-to-bcache_device_.patch +++ b/for-next/0020-bcache-more-detailed-error-message-to-bcache_device_.patch @@ -1,4 +1,4 @@ -From 1453d186bc386f667d6dc296d5cb9f4b87c54856 Mon Sep 17 00:00:00 2001 +From 8a5acc9fdaedac2b13cbbcd4366adad68df92066 Mon Sep 17 00:00:00 2001 From: Coly Li <colyli@suse.de> Date: Sat, 1 Jun 2019 00:57:38 +0800 Subject: [PATCH 20/24] bcache: more detailed error message to @@ -10,7 +10,7 @@ Signed-off-by: Coly Li <colyli@suse.de> 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c -index 30e11d52c14e..9452f5bf9b54 100644 +index 2c1d56c205d4..5044f4eb5eb0 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -695,6 +695,7 @@ static void bcache_device_link(struct bcache_device *d, struct cache_set *c, diff --git a/for-next/0021-bcache-add-more-error-message-in-bch_cached_dev_atta.patch b/for-next/0021-bcache-add-more-error-message-in-bch_cached_dev_atta.patch index bbee60e..bb475db 100644 --- a/for-next/0021-bcache-add-more-error-message-in-bch_cached_dev_atta.patch +++ b/for-next/0021-bcache-add-more-error-message-in-bch_cached_dev_atta.patch @@ -1,4 +1,4 @@ -From 69e6f936a23c031bf9b3b7cfeb10d1e1c4a704a8 Mon Sep 17 00:00:00 2001 +From 4dc4687d60a9bb2b689efe99571f9169fc72e3bf Mon Sep 17 00:00:00 2001 From: Coly Li <colyli@suse.de> Date: Sat, 1 Jun 2019 01:03:00 +0800 Subject: [PATCH 21/24] bcache: add more error message in @@ -10,7 +10,7 @@ Signed-off-by: Coly Li <colyli@suse.de> 1 file changed, 4 insertions(+) diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c -index 9452f5bf9b54..61783e7bc616 100644 +index 5044f4eb5eb0..521fa15889fa 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -1170,6 +1170,8 @@ int bch_cached_dev_attach(struct cached_dev *dc, struct cache_set *c, @@ -24,9 +24,9 @@ index 9452f5bf9b54..61783e7bc616 100644 @@ -1183,6 +1185,8 @@ int bch_cached_dev_attach(struct cached_dev *dc, struct cache_set *c, ret = bch_cached_dev_run(dc); - if (ret) { + if (ret && (ret != -EBUSY)) { up_write(&dc->writeback_lock); -+ pr_err("Could run cached device %s", ++ pr_err("Couldn't run cached device %s", + dc->backing_dev_name); return ret; } diff --git a/for-next/0022-bcache-improve-error-message-in-bch_cached_dev_run.patch b/for-next/0022-bcache-improve-error-message-in-bch_cached_dev_run.patch index 3e52c1c..424368c 100644 --- a/for-next/0022-bcache-improve-error-message-in-bch_cached_dev_run.patch +++ b/for-next/0022-bcache-improve-error-message-in-bch_cached_dev_run.patch @@ -1,4 +1,4 @@ -From e27aeeb12384055c74939f52d0ae9ba68934b20e Mon Sep 17 00:00:00 2001 +From d16e88ed2174d61461cefb80dce7bb401b7f614a Mon Sep 17 00:00:00 2001 From: Coly Li <colyli@suse.de> Date: Sat, 1 Jun 2019 01:09:06 +0800 Subject: [PATCH 22/24] bcache: improve error message in bch_cached_dev_run() @@ -12,7 +12,7 @@ Signed-off-by: Coly Li <colyli@suse.de> 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c -index 61783e7bc616..d6ec2ebbdab7 100644 +index 521fa15889fa..98a48a9a08b8 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c @@ -928,13 +928,18 @@ int bch_cached_dev_run(struct cached_dev *dc) diff --git a/for-next/0023-bcache-fix-race-in-btree_flush_write.patch b/for-next/0023-bcache-fix-race-in-btree_flush_write.patch index e37cf0f..44a7335 100644 --- a/for-next/0023-bcache-fix-race-in-btree_flush_write.patch +++ b/for-next/0023-bcache-fix-race-in-btree_flush_write.patch @@ -1,4 +1,4 @@ -From 8cf96f72c3f368983f243042b0adc90cb72e08ed Mon Sep 17 00:00:00 2001 +From 09104e736270f9f09dcf5f34cb990c69bd157a2a Mon Sep 17 00:00:00 2001 From: Coly Li <colyli@suse.de> Date: Sat, 1 Jun 2019 01:55:30 +0800 Subject: [PATCH 23/24] bcache: fix race in btree_flush_write() @@ -7,9 +7,9 @@ Signed-off-by: Coly Li <colyli@suse.de> --- drivers/md/bcache/btree.c | 15 +++++++- drivers/md/bcache/btree.h | 2 + - drivers/md/bcache/journal.c | 92 +++++++++++++++++++++++++++++++++------------ + drivers/md/bcache/journal.c | 93 ++++++++++++++++++++++++++++++++++----------- drivers/md/bcache/journal.h | 4 ++ - 4 files changed, 89 insertions(+), 24 deletions(-) + 4 files changed, 90 insertions(+), 24 deletions(-) diff --git a/drivers/md/bcache/btree.c b/drivers/md/bcache/btree.c index cf38a1b031fa..c0dd8fde37af 100644 @@ -64,7 +64,7 @@ index d1c72ef64edf..76cfd121a486 100644 static inline struct btree_write *btree_current_write(struct btree *b) { diff --git a/drivers/md/bcache/journal.c b/drivers/md/bcache/journal.c -index 0e39d6d63ab8..0a607353d7a0 100644 +index 0e39d6d63ab8..28e53b196a80 100644 --- a/drivers/md/bcache/journal.c +++ b/drivers/md/bcache/journal.c @@ -334,41 +334,87 @@ int bch_journal_replay(struct cache_set *s, struct list_head *list) @@ -178,6 +178,14 @@ index 0e39d6d63ab8..0a607353d7a0 100644 } #define last_seq(j) ((j)->seq - fifo_used(&(j)->pin) + 1) +@@ -790,6 +836,7 @@ int bch_journal_alloc(struct cache_set *c) + struct journal *j = &c->journal; + + spin_lock_init(&j->lock); ++ spin_lock_init(&j->flush_write_lock); + INIT_DELAYED_WORK(&j->work, journal_write_work); + + c->journal_delay_ms = 100; diff --git a/drivers/md/bcache/journal.h b/drivers/md/bcache/journal.h index 66f0facff84b..aeed791f05e7 100644 --- a/drivers/md/bcache/journal.h diff --git a/for-next/0024-bcache-remove-retry_flush_write-from-struct-cache_se.patch b/for-next/0024-bcache-remove-retry_flush_write-from-struct-cache_se.patch index b2ea485..5b98984 100644 --- a/for-next/0024-bcache-remove-retry_flush_write-from-struct-cache_se.patch +++ b/for-next/0024-bcache-remove-retry_flush_write-from-struct-cache_se.patch @@ -1,4 +1,4 @@ -From 8585e338c7efee4a9ab805c322f0e6a828e01eb6 Mon Sep 17 00:00:00 2001 +From 70c844adf6eae686240977f5c733a993a709b173 Mon Sep 17 00:00:00 2001 From: Coly Li <colyli@suse.de> Date: Sat, 1 Jun 2019 01:58:23 +0800 Subject: [PATCH 24/24] bcache: remove retry_flush_write from struct cache_set diff --git a/for-next/0025-bcache-no-error-messeage-if-bch_cached_dev_run-retur.patch b/for-next/0025-bcache-no-error-messeage-if-bch_cached_dev_run-retur.patch new file mode 100644 index 0000000..61140a9 --- /dev/null +++ b/for-next/0025-bcache-no-error-messeage-if-bch_cached_dev_run-retur.patch @@ -0,0 +1,43 @@ +From 4acb9cbc63063a7f481de52e517dfd352a740864 Mon Sep 17 00:00:00 2001 +From: Coly Li <colyli@suse.de> +Date: Sat, 1 Jun 2019 19:58:24 +0800 +Subject: [PATCH 25/25] bcache: no error messeage if bch_cached_dev_run() + returns -EBUSY + +When calling bch_cached_dev_run() if the cached device is running +already, current error message is, + bcache: bch_cached_dev_run() cached dev md0 is running already + bcache: bch_cached_dev_attach() Could run cached device md0 +This is confused, looks like the cached device failed. + +This patch avoids to print second error message if bch_cached_dev_run() +returns -EBUSY, for other error condition, the error message is +printed as well. + +Signed-off-by: Coly Li <colyli@suse.de> +--- + drivers/md/bcache/super.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c +index 954896424010..c3c9e08f8376 100644 +--- a/drivers/md/bcache/super.c ++++ b/drivers/md/bcache/super.c +@@ -1188,10 +1188,11 @@ int bch_cached_dev_attach(struct cached_dev *dc, struct cache_set *c, + bch_sectors_dirty_init(&dc->disk); + + ret = bch_cached_dev_run(dc); +- if (ret) { ++ if (ret < 0) { + up_write(&dc->writeback_lock); +- pr_err("Couldn't run cached device %s", +- dc->backing_dev_name); ++ if (ret != -EBUSY) ++ pr_err("Couldn't run cached device %s", ++ dc->backing_dev_name); + return ret; + } + +-- +2.16.4 + |