Skip to content
Commit b7c178d9 authored by Meir Elisha's avatar Meir Elisha Committed by Yu Kuai
Browse files

md/raid1: Add check for missing source disk in process_checks()

During recovery/check operations, the process_checks function loops
through available disks to find a 'primary' source with successfully
read data.

If no suitable source disk is found after checking all possibilities,
the 'primary' index will reach conf->raid_disks * 2. Add an explicit
check for this condition after the loop. If no source disk was found,
print an error message and return early to prevent further processing
without a valid primary source.

Link: https://lore.kernel.org/linux-raid/20250408143808.1026534-1-meir.elisha@volumez.com


Signed-off-by: default avatarMeir Elisha <meir.elisha@volumez.com>
Suggested-and-reviewed-by: default avatarYu Kuai <yukuai3@huawei.com>
Signed-off-by: default avatarYu Kuai <yukuai3@huawei.com>
parent 6ec1f023
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment