summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid5.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2017-04-05 06:05:51 +0200
committerShaohua Li <shli@fb.com>2017-04-11 19:15:08 +0200
commit545250f2480911f053b092d4229d9f83a9dff222 (patch)
treed3851a668cead58445e1dab3cb45d08b954831a5 /drivers/md/raid5.c
parentmd/raid10: simplify the splitting of requests. (diff)
downloadlinux-545250f2480911f053b092d4229d9f83a9dff222.tar.xz
linux-545250f2480911f053b092d4229d9f83a9dff222.zip
md/raid10: simplify handle_read_error()
handle_read_error() duplicates a lot of the work that raid10_read_request() does, so it makes sense to just use that function. handle_read_error() relies on the same r10bio being re-used so that, in the case of a read-only array, setting IO_BLOCKED in r1bio->devs[].bio ensures read_balance() won't re-use that device. So when called from raid10_make_request() we clear that array, but not when called from handle_read_error(). Two parts of handle_read_error() that need to be preserved are the warning message it prints, so they are conditionally added to raid10_read_request(). If the failing rdev can be found, messages are printed. Otherwise they aren't. Not that as rdev_dec_pending() has already been called on the failing rdev, we need to use rcu_read_lock() to get a new reference from the conf. We only use this to get the name of the failing block device. With this change, we no longer need inc_pending(). Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/raid5.c')
0 files changed, 0 insertions, 0 deletions