Skip to content
Snippets Groups Projects
Commit 5cbc7d01 authored by Yufen Yu's avatar Yufen Yu Committed by 谢秀奇
Browse files

md/raid1: end bio when the device faulty

hulk inclusion
category: bugfix
bugzilla: 18664
CVE: NA
---------------------------

When write bio return error, it would be added to conf->retry_list
and wait for raid1d thread to retry write and acknowledge badblocks.

In narrow_write_error(), the error bio will be split in the unit of
badblock shift (such as one sector) and raid1d thread issues them
one by one. Until all of the splited bio has finished, raid1d thread
can go on processing other things, which is time consuming.

But, there is a scene for error handling that is not necessary.
When the device has been set faulty, flush_bio_list() may end
bios in pending_bio_list with error status. Since these bios
has not been issued to the device actually, error handlding to
retry write and acknowledge badblocks make no sense.

Even without that scene, when the device is faulty, badblocks info
can not be written out to the device. Thus, we also no need to
handle the error IO.

Link: https://marc.info/?l=linux-raid&m=156351499609153&w=2



Signed-off-by: default avatarYufen Yu <yuyufen@huawei.com>
Reviewed-by: default avatarHou Tao <houtao1@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 62ad5963
No related branches found
No related tags found
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment