Commit 1776ad1
btrfs: Refactor btrfs_rmap_block to improve readability
Move variables to appropriate scope. Remove last BUG_ON in the function
and rework error handling accordingly. Make the duplicate detection code
more straightforward. Use in_range macro. And give variables more
descriptive name by explicitly distinguishing between IO stripe size
(size recorded in the chunk item) and data stripe size (the size of
an actual stripe, constituting a logical chunk/block group).
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>1 parent bf2e2eb commit 1776ad1
1 file changed
+33
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1582 | 1582 | | |
1583 | 1583 | | |
1584 | 1584 | | |
1585 | | - | |
1586 | | - | |
1587 | | - | |
1588 | | - | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
1589 | 1589 | | |
1590 | 1590 | | |
1591 | 1591 | | |
1592 | 1592 | | |
1593 | 1593 | | |
1594 | 1594 | | |
1595 | | - | |
1596 | | - | |
| 1595 | + | |
| 1596 | + | |
1597 | 1597 | | |
1598 | 1598 | | |
1599 | | - | |
| 1599 | + | |
| 1600 | + | |
1600 | 1601 | | |
1601 | | - | |
| 1602 | + | |
1602 | 1603 | | |
1603 | | - | |
1604 | | - | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
1605 | 1607 | | |
1606 | 1608 | | |
1607 | 1609 | | |
1608 | | - | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
1609 | 1614 | | |
1610 | 1615 | | |
1611 | | - | |
1612 | | - | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
1613 | 1622 | | |
1614 | 1623 | | |
1615 | 1624 | | |
| |||
1627 | 1636 | | |
1628 | 1637 | | |
1629 | 1638 | | |
1630 | | - | |
1631 | | - | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
1632 | 1642 | | |
1633 | | - | |
| 1643 | + | |
| 1644 | + | |
1634 | 1645 | | |
| 1646 | + | |
1635 | 1647 | | |
1636 | | - | |
1637 | | - | |
| 1648 | + | |
| 1649 | + | |
1638 | 1650 | | |
1639 | | - | |
1640 | 1651 | | |
1641 | 1652 | | |
1642 | 1653 | | |
1643 | 1654 | | |
1644 | | - | |
1645 | | - | |
| 1655 | + | |
| 1656 | + | |
1646 | 1657 | | |
1647 | | - | |
| 1658 | + | |
1648 | 1659 | | |
1649 | 1660 | | |
1650 | 1661 | | |
| |||
0 commit comments