Commit 6fa7475
block: factor out a bio_await helper
Add a new helper to wait for a bio and anything chained off it to
complete synchronously after submitting it. This factors common code out
of submit_bio_wait and bio_await_chain and will also be useful for
file system code and thus is exported.
Note that this will now set REQ_SYNC also for the bio_await case for
consistency. Nothing should look at the flag in the end_io handler,
but if something does having the flag set makes more sense.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://patch.msgid.link/20260407140538.633364-4-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 65565ca commit 6fa7475
2 files changed
Lines changed: 39 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1468 | 1468 | | |
1469 | 1469 | | |
1470 | 1470 | | |
1471 | | - | |
1472 | | - | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
1473 | 1475 | | |
1474 | | - | |
1475 | | - | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
1476 | 1480 | | |
1477 | | - | |
1478 | | - | |
1479 | | - | |
| 1481 | + | |
1480 | 1482 | | |
1481 | | - | |
| 1483 | + | |
| 1484 | + | |
1482 | 1485 | | |
1483 | 1486 | | |
1484 | 1487 | | |
1485 | 1488 | | |
1486 | 1489 | | |
1487 | 1490 | | |
1488 | 1491 | | |
1489 | | - | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
1490 | 1496 | | |
| 1497 | + | |
| 1498 | + | |
1491 | 1499 | | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
1492 | 1514 | | |
1493 | 1515 | | |
1494 | 1516 | | |
1495 | 1517 | | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
1496 | 1523 | | |
1497 | 1524 | | |
1498 | 1525 | | |
| |||
1528 | 1555 | | |
1529 | 1556 | | |
1530 | 1557 | | |
1531 | | - | |
1532 | | - | |
1533 | | - | |
1534 | | - | |
1535 | | - | |
1536 | | - | |
1537 | | - | |
| 1558 | + | |
1538 | 1559 | | |
1539 | 1560 | | |
1540 | 1561 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
| 435 | + | |
| 436 | + | |
435 | 437 | | |
436 | 438 | | |
437 | 439 | | |
| |||
0 commit comments