Commit b1a7ad8
md/raid1: Handle bio_split() errors
Add proper bio_split() error handling. For any error, call
raid_end_bio_io() and return.
For the case of an in the write path, we need to undo the increment in
the rdev pending count and NULLify the r1_bio->bios[] pointers.
For read path failure, we need to undo rdev pending count increment from
the earlier read_balance() call.
Reviewed-by: Yu Kuai <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Signed-off-by: John Garry <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>1 parent 74538fd commit b1a7ad8
1 file changed
+31
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1322 | 1322 | | |
1323 | 1323 | | |
1324 | 1324 | | |
1325 | | - | |
| 1325 | + | |
1326 | 1326 | | |
1327 | 1327 | | |
1328 | 1328 | | |
| |||
1383 | 1383 | | |
1384 | 1384 | | |
1385 | 1385 | | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
1386 | 1391 | | |
1387 | 1392 | | |
1388 | 1393 | | |
| |||
1410 | 1415 | | |
1411 | 1416 | | |
1412 | 1417 | | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
1413 | 1425 | | |
1414 | 1426 | | |
1415 | 1427 | | |
| |||
1451 | 1463 | | |
1452 | 1464 | | |
1453 | 1465 | | |
1454 | | - | |
| 1466 | + | |
1455 | 1467 | | |
1456 | 1468 | | |
1457 | 1469 | | |
| |||
1579 | 1591 | | |
1580 | 1592 | | |
1581 | 1593 | | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
1582 | 1599 | | |
1583 | 1600 | | |
1584 | 1601 | | |
| |||
1663 | 1680 | | |
1664 | 1681 | | |
1665 | 1682 | | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
1666 | 1695 | | |
1667 | 1696 | | |
1668 | 1697 | | |
| |||
0 commit comments