Repository navigation
Commit 823bb20
committed
btrfs: add wrapper for counting BTRFS_MAX_EXTENT_SIZE
The expression is open-coded in several places, this asks for a wrapper.
As we know the MAX_EXTENT fits to u32, we can use the appropirate
division helper. This cascades to the result type updates.
Compiler is clever enough to use shift instead of integer division, so
there's no change in the generated assembly.
Signed-off-by: David Sterba <dsterba@suse.com>1 parent 95995db commit 823bb20
3 files changed
Lines changed: 23 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
100 | 108 | | |
101 | 109 | | |
102 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5844 | 5844 | | |
5845 | 5845 | | |
5846 | 5846 | | |
5847 | | - | |
| 5847 | + | |
5848 | 5848 | | |
5849 | | - | |
5850 | | - | |
5851 | | - | |
| 5849 | + | |
5852 | 5850 | | |
5853 | 5851 | | |
5854 | 5852 | | |
| |||
5927 | 5925 | | |
5928 | 5926 | | |
5929 | 5927 | | |
5930 | | - | |
| 5928 | + | |
5931 | 5929 | | |
5932 | 5930 | | |
5933 | 5931 | | |
| |||
5960 | 5958 | | |
5961 | 5959 | | |
5962 | 5960 | | |
5963 | | - | |
5964 | | - | |
5965 | | - | |
| 5961 | + | |
5966 | 5962 | | |
5967 | 5963 | | |
5968 | 5964 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1605 | 1605 | | |
1606 | 1606 | | |
1607 | 1607 | | |
1608 | | - | |
| 1608 | + | |
1609 | 1609 | | |
1610 | 1610 | | |
1611 | 1611 | | |
1612 | 1612 | | |
1613 | 1613 | | |
1614 | 1614 | | |
1615 | 1615 | | |
1616 | | - | |
1617 | | - | |
| 1616 | + | |
1618 | 1617 | | |
1619 | | - | |
1620 | | - | |
1621 | | - | |
1622 | | - | |
| 1618 | + | |
| 1619 | + | |
1623 | 1620 | | |
1624 | 1621 | | |
1625 | 1622 | | |
| |||
1639 | 1636 | | |
1640 | 1637 | | |
1641 | 1638 | | |
1642 | | - | |
| 1639 | + | |
1643 | 1640 | | |
1644 | 1641 | | |
1645 | 1642 | | |
| |||
1677 | 1674 | | |
1678 | 1675 | | |
1679 | 1676 | | |
1680 | | - | |
1681 | | - | |
| 1677 | + | |
1682 | 1678 | | |
1683 | | - | |
1684 | | - | |
1685 | | - | |
1686 | | - | |
1687 | | - | |
| 1679 | + | |
| 1680 | + | |
1688 | 1681 | | |
1689 | 1682 | | |
1690 | 1683 | | |
| |||
1793 | 1786 | | |
1794 | 1787 | | |
1795 | 1788 | | |
1796 | | - | |
1797 | | - | |
| 1789 | + | |
1798 | 1790 | | |
1799 | 1791 | | |
1800 | 1792 | | |
| |||
7617 | 7609 | | |
7618 | 7610 | | |
7619 | 7611 | | |
7620 | | - | |
| 7612 | + | |
7621 | 7613 | | |
7622 | | - | |
7623 | | - | |
7624 | 7614 | | |
7625 | 7615 | | |
7626 | 7616 | | |
| |||
8681 | 8671 | | |
8682 | 8672 | | |
8683 | 8673 | | |
8684 | | - | |
8685 | | - | |
8686 | | - | |
| 8674 | + | |
8687 | 8675 | | |
8688 | 8676 | | |
8689 | 8677 | | |
| |||
0 commit comments