Commit 71cc21e
Ming Lei
md/raid1: Add check for missing source disk in process_checks()
JIRA: https://issues.redhat.com/browse/RHEL-106845
commit b7c178d
Author: Meir Elisha <meir.elisha@volumez.com>
Date: Tue Apr 8 17:38:08 2025 +0300
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: Meir Elisha <meir.elisha@volumez.com>
Suggested-and-reviewed-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>1 parent bb7c988 commit 71cc21e
1 file changed
+16
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2202 | 2202 | | |
2203 | 2203 | | |
2204 | 2204 | | |
2205 | | - | |
2206 | | - | |
2207 | | - | |
2208 | | - | |
2209 | | - | |
2210 | | - | |
| 2205 | + | |
2211 | 2206 | | |
2212 | | - | |
| 2207 | + | |
2213 | 2208 | | |
2214 | 2209 | | |
2215 | 2210 | | |
| |||
2348 | 2343 | | |
2349 | 2344 | | |
2350 | 2345 | | |
2351 | | - | |
2352 | | - | |
2353 | | - | |
| 2346 | + | |
| 2347 | + | |
| 2348 | + | |
| 2349 | + | |
| 2350 | + | |
| 2351 | + | |
| 2352 | + | |
| 2353 | + | |
| 2354 | + | |
| 2355 | + | |
| 2356 | + | |
| 2357 | + | |
2354 | 2358 | | |
| 2359 | + | |
| 2360 | + | |
2355 | 2361 | | |
2356 | 2362 | | |
2357 | 2363 | | |
| |||
0 commit comments