Commit ab13e8c
ext4: refactor the block allocation process of ext4_page_mkwrite()
commit 2bddafe upstream.
The block allocation process and error handling in ext4_page_mkwrite()
is complex now. Refactor it by introducing a new helper function,
ext4_block_page_mkwrite(). It will call ext4_block_write_begin() to
allocate blocks instead of directly calling block_page_mkwrite().
Preparing to implement retry logic in a subsequent patch to address
situations where the reserved journal credits are insufficient.
Additionally, this modification will help prevent potential deadlocks
that may occur when waiting for folio writeback while holding the
transaction handle.
Suggested-by: Jan Kara <[email protected]>
Signed-off-by: Zhang Yi <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Theodore Ts'o <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 98571b6 commit ab13e8c
1 file changed
Lines changed: 50 additions & 45 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6622 | 6622 | | |
6623 | 6623 | | |
6624 | 6624 | | |
| 6625 | + | |
| 6626 | + | |
| 6627 | + | |
| 6628 | + | |
| 6629 | + | |
| 6630 | + | |
| 6631 | + | |
| 6632 | + | |
| 6633 | + | |
| 6634 | + | |
| 6635 | + | |
| 6636 | + | |
| 6637 | + | |
| 6638 | + | |
| 6639 | + | |
| 6640 | + | |
| 6641 | + | |
| 6642 | + | |
| 6643 | + | |
| 6644 | + | |
| 6645 | + | |
| 6646 | + | |
| 6647 | + | |
| 6648 | + | |
| 6649 | + | |
| 6650 | + | |
| 6651 | + | |
| 6652 | + | |
| 6653 | + | |
| 6654 | + | |
| 6655 | + | |
| 6656 | + | |
| 6657 | + | |
| 6658 | + | |
| 6659 | + | |
| 6660 | + | |
| 6661 | + | |
| 6662 | + | |
| 6663 | + | |
| 6664 | + | |
| 6665 | + | |
| 6666 | + | |
| 6667 | + | |
| 6668 | + | |
| 6669 | + | |
| 6670 | + | |
| 6671 | + | |
6625 | 6672 | | |
6626 | 6673 | | |
6627 | 6674 | | |
| |||
6633 | 6680 | | |
6634 | 6681 | | |
6635 | 6682 | | |
6636 | | - | |
6637 | | - | |
| 6683 | + | |
6638 | 6684 | | |
6639 | 6685 | | |
6640 | 6686 | | |
| |||
6702 | 6748 | | |
6703 | 6749 | | |
6704 | 6750 | | |
6705 | | - | |
6706 | | - | |
6707 | 6751 | | |
6708 | | - | |
6709 | | - | |
6710 | | - | |
6711 | | - | |
6712 | | - | |
6713 | | - | |
6714 | | - | |
6715 | | - | |
6716 | | - | |
6717 | | - | |
6718 | | - | |
6719 | | - | |
6720 | | - | |
6721 | | - | |
6722 | | - | |
6723 | | - | |
6724 | | - | |
6725 | | - | |
6726 | | - | |
6727 | | - | |
6728 | | - | |
6729 | | - | |
6730 | | - | |
6731 | | - | |
6732 | | - | |
6733 | | - | |
6734 | | - | |
6735 | | - | |
6736 | | - | |
6737 | | - | |
6738 | | - | |
6739 | | - | |
6740 | | - | |
6741 | | - | |
6742 | | - | |
6743 | | - | |
6744 | | - | |
| 6752 | + | |
| 6753 | + | |
6745 | 6754 | | |
6746 | 6755 | | |
6747 | 6756 | | |
| |||
6750 | 6759 | | |
6751 | 6760 | | |
6752 | 6761 | | |
6753 | | - | |
6754 | | - | |
6755 | | - | |
6756 | | - | |
6757 | 6762 | | |
0 commit comments