Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2019-05-17 06:54:10 +0200
committerJiri Slaby <jslaby@suse.cz>2019-05-17 06:54:11 +0200
commit49d8b5fa36367d763456d9761fd04d386196e5c9 (patch)
tree5ee6ca0f6bca5ca377d6620496db4d81c3b686cc
parent073196d10993d0156c3e040fe324a0e3c0745523 (diff)
Revert "Don't jump to compute_result state from check_result
state" (git-fixes).
-rw-r--r--patches.suse/Revert-Don-t-jump-to-compute_result-state-from-check.patch56
-rw-r--r--series.conf1
2 files changed, 57 insertions, 0 deletions
diff --git a/patches.suse/Revert-Don-t-jump-to-compute_result-state-from-check.patch b/patches.suse/Revert-Don-t-jump-to-compute_result-state-from-check.patch
new file mode 100644
index 0000000000..759aa6ac2f
--- /dev/null
+++ b/patches.suse/Revert-Don-t-jump-to-compute_result-state-from-check.patch
@@ -0,0 +1,56 @@
+From: Song Liu <songliubraving@fb.com>
+Date: Tue, 16 Apr 2019 09:34:21 -0700
+Subject: Revert "Don't jump to compute_result state from check_result state"
+Git-commit: a25d8c327bb41742dbd59f8c545f59f3b9c39983
+Patch-mainline: 5.2-rc1
+References: git-fixes
+
+This reverts commit 4f4fd7c5798bbdd5a03a60f6269cf1177fbd11ef.
+
+Cc: Dan Williams <dan.j.williams@intel.com>
+Cc: Nigel Croxon <ncroxon@redhat.com>
+Cc: Xiao Ni <xni@redhat.com>
+Signed-off-by: Song Liu <songliubraving@fb.com>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ drivers/md/raid5.c | 19 +++++++++++++++----
+ 1 file changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
+index 2b0a715e70c9..b5742d07662d 100644
+--- a/drivers/md/raid5.c
++++ b/drivers/md/raid5.c
+@@ -4227,15 +4227,26 @@ static void handle_parity_checks6(struct r5conf *conf, struct stripe_head *sh,
+ case check_state_check_result:
+ sh->check_state = check_state_idle;
+
+- if (s->failed > 1)
+- break;
+ /* handle a successful check operation, if parity is correct
+ * we are done. Otherwise update the mismatch count and repair
+ * parity if !MD_RECOVERY_CHECK
+ */
+ if (sh->ops.zero_sum_result == 0) {
+- /* Any parity checked was correct */
+- set_bit(STRIPE_INSYNC, &sh->state);
++ /* both parities are correct */
++ if (!s->failed)
++ set_bit(STRIPE_INSYNC, &sh->state);
++ else {
++ /* in contrast to the raid5 case we can validate
++ * parity, but still have a failure to write
++ * back
++ */
++ sh->check_state = check_state_compute_result;
++ /* Returning at this point means that we may go
++ * off and bring p and/or q uptodate again so
++ * we make sure to check zero_sum_result again
++ * to verify if p or q need writeback
++ */
++ }
+ } else {
+ atomic64_add(STRIPE_SECTORS, &conf->mddev->resync_mismatches);
+ if (test_bit(MD_RECOVERY_CHECK, &conf->mddev->recovery)) {
+--
+2.21.0
+
diff --git a/series.conf b/series.conf
index 07afa717ee..5654c17b26 100644
--- a/series.conf
+++ b/series.conf
@@ -460,6 +460,7 @@
########################################################
# md
########################################################
+ patches.suse/Revert-Don-t-jump-to-compute_result-state-from-check.patch
##########################################################
#