md/raid1: add error handling of read error from FailFast device
authorGioh Kim <gi-oh.kim@profitbricks.com>
Wed, 2 May 2018 11:08:11 +0000 (13:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Aug 2018 05:50:33 +0000 (07:50 +0200)
commit1b3433cfa222b65342a4f945b96bec991ed6fe05
treefe4314834586b35ca6e7b9337f3b7d73b4cf1c3d
parent6192b115c58b725789cb333b4e043a6491c8d313
md/raid1: add error handling of read error from FailFast device

[ Upstream commit b33d10624fdc15cdf1495f3f00481afccec76783 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/raid1.c