Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2018-11-01 14:04:41 +1100
committerNeilBrown <neilb@suse.com>2018-11-01 14:05:42 +1100
commit75eb38a04c70bcf43357536c8b868adc8eaf26c6 (patch)
tree1ab2633725958f969092bc0f3a7c8ef1d5732edd
parent12be851cb54dfcc7e1bd7c8c18b2bbf663f49385 (diff)
md/raid1: add error handling of read error from FailFast device
(git-fixes).
-rw-r--r--patches.fixes/md-raid1-add-error-handling-of-read-error-from-FailF.patch37
-rw-r--r--series.conf1
2 files changed, 38 insertions, 0 deletions
diff --git a/patches.fixes/md-raid1-add-error-handling-of-read-error-from-FailF.patch b/patches.fixes/md-raid1-add-error-handling-of-read-error-from-FailF.patch
new file mode 100644
index 0000000000..b5184c1d82
--- /dev/null
+++ b/patches.fixes/md-raid1-add-error-handling-of-read-error-from-FailF.patch
@@ -0,0 +1,37 @@
+From: Gioh Kim <gi-oh.kim@profitbricks.com>
+Date: Wed, 2 May 2018 13:08:11 +0200
+Subject: [PATCH] md/raid1: add error handling of read error from FailFast
+ device
+Git-commit: b33d10624fdc15cdf1495f3f00481afccec76783
+Patch-mainline: v4.18
+References: git-fixes
+
+Current handle_read_error() function calls fix_read_error()
+only if md device is RW and rdev does not include FailFast flag.
+It does not handle a read error from a RW device including
+FailFast flag.
+
+I am not sure it is intended. But I found that write IO error
+sets rdev faulty. The md module should handle the read IO error and
+write IO error equally. So I think read IO error should set rdev faulty.
+
+Signed-off-by: Gioh Kim <gi-oh.kim@profitbricks.com>
+Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com>
+Signed-off-by: Shaohua Li <shli@fb.com>
+Acked-by: NeilBrown <neilb@suse.com>
+
+---
+ drivers/md/raid1.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/md/raid1.c
++++ b/drivers/md/raid1.c
+@@ -2475,6 +2475,8 @@ static void handle_read_error(struct r1c
+ fix_read_error(conf, r1_bio->read_disk,
+ r1_bio->sector, r1_bio->sectors);
+ unfreeze_array(conf);
++ } else if (mddev->ro == 0 && test_bit(FailFast, &rdev->flags)) {
++ md_error(mddev, rdev);
+ } else {
+ r1_bio->bios[r1_bio->read_disk] = IO_BLOCKED;
+ }
diff --git a/series.conf b/series.conf
index 4e0976c455..1f3637588a 100644
--- a/series.conf
+++ b/series.conf
@@ -16418,6 +16418,7 @@
patches.drivers/0001-raid10-check-bio-in-r10buf_pool_free-to-void-NULL-po.patch
patches.drivers/0001-md-fix-two-problems-with-setting-the-re-add-device-s.patch
patches.fixes/md-fix-NULL-dereference-of-mddev-pers-in-remove_and_.patch
+ patches.fixes/md-raid1-add-error-handling-of-read-error-from-FailF.patch
patches.drivers/clk-qcom-Base-rcg-parent-rate-off-plan-frequency
patches.drivers/clk-imx7d-fix-mipi-dphy-div-parent
patches.drivers/clk-mvebu-use-correct-bit-for-98DX3236-NAND