Commit 64e7b8c
btrfs: raid56: prepare verify_bio_data_sectors() to support bs > ps cases
The function verify_bio_data_sectors() assume each fs block can be mapped by
one page, blocking bs > ps support for raid56.
Prepare it for bs > ps cases by:
- Make get_bio_sector_nr() to consider bs > ps cases
The function is utilized to calculate the sector number of a device
bio submitted by btrfs raid56 layer.
- Assemble a local paddrs[] for checksum calculation
- Open code btrfs_check_block_csum()
btrfs_check_block_csum() only supports fs blocks backed by large
folios.
But for raid56 we can have fs blocks backed by multiple non-contiguous
pages, e.g. direct IO, encoded read/write/send.
So instead of using btrfs_check_block_csum(), open code it to use
btrfs_calculate_block_csum_pages().
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>1 parent e0eadfc commit 64e7b8c
1 file changed
Lines changed: 18 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1620 | 1620 | | |
1621 | 1621 | | |
1622 | 1622 | | |
1623 | | - | |
| 1623 | + | |
1624 | 1624 | | |
1625 | | - | |
| 1625 | + | |
1626 | 1626 | | |
1627 | 1627 | | |
1628 | 1628 | | |
| |||
1655 | 1655 | | |
1656 | 1656 | | |
1657 | 1657 | | |
| 1658 | + | |
| 1659 | + | |
1658 | 1660 | | |
| 1661 | + | |
| 1662 | + | |
1659 | 1663 | | |
1660 | 1664 | | |
1661 | 1665 | | |
| |||
1666 | 1670 | | |
1667 | 1671 | | |
1668 | 1672 | | |
1669 | | - | |
| 1673 | + | |
1670 | 1674 | | |
1671 | | - | |
1672 | | - | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
1673 | 1683 | | |
1674 | 1684 | | |
1675 | 1685 | | |
1676 | 1686 | | |
1677 | 1687 | | |
1678 | | - | |
1679 | | - | |
1680 | | - | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
1681 | 1691 | | |
1682 | 1692 | | |
1683 | 1693 | | |
| |||
0 commit comments