mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 02:53:36 +02:00
md: don't wait faulty rdev in md_wait_for_blocked_rdev()
md_wait_for_blocked_rdev() is called for write IO while rdev is blocked, howerver, rdev can be faulty after choosing this rdev to write, and faulty rdev should never be accessed anymore, hence there is no point to wait for faulty rdev to be unblocked. Signed-off-by: Yu Kuai <yukuai3@huawei.com> Tested-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> Link: https://lore.kernel.org/r/20241031033114.3845582-3-yukuai1@huaweicloud.com Signed-off-by: Song Liu <song@kernel.org>
This commit is contained in:
parent
4abfce19c7
commit
50e8274855
|
|
@ -9762,9 +9762,7 @@ EXPORT_SYMBOL(md_reap_sync_thread);
|
|||
void md_wait_for_blocked_rdev(struct md_rdev *rdev, struct mddev *mddev)
|
||||
{
|
||||
sysfs_notify_dirent_safe(rdev->sysfs_state);
|
||||
wait_event_timeout(rdev->blocked_wait,
|
||||
!test_bit(Blocked, &rdev->flags) &&
|
||||
!test_bit(BlockedBadBlocks, &rdev->flags),
|
||||
wait_event_timeout(rdev->blocked_wait, !rdev_blocked(rdev),
|
||||
msecs_to_jiffies(5000));
|
||||
rdev_dec_pending(rdev, mddev);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user