Commit 09f5d92
btrfs: replace for_each_set_bit() with for_each_set_bitmap()
Inside extent_io.c, there are several simple call sites doing things
like:
for_each_set_bit(bit, bitmap, bitmap_size) {
/* handle one fs block */
}
The workload includes:
- set_bit()
Inside extent_writepage_io().
This can be replaced with a bitmap_set().
- btrfs_folio_set_lock()
- btrfs_mark_ordered_io_finished()
Inside writepage_delalloc().
Instead of calling it multiple times, we can pass a range into the
function with one call.
Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>1 parent 4bd427f commit 09f5d92
1 file changed
+16
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1439 | 1439 | | |
1440 | 1440 | | |
1441 | 1441 | | |
| 1442 | + | |
| 1443 | + | |
1442 | 1444 | | |
1443 | | - | |
1444 | 1445 | | |
1445 | 1446 | | |
1446 | 1447 | | |
| |||
1450 | 1451 | | |
1451 | 1452 | | |
1452 | 1453 | | |
1453 | | - | |
1454 | | - | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
1455 | 1458 | | |
1456 | | - | |
| 1459 | + | |
1457 | 1460 | | |
1458 | 1461 | | |
1459 | 1462 | | |
| |||
1570 | 1573 | | |
1571 | 1574 | | |
1572 | 1575 | | |
1573 | | - | |
1574 | | - | |
1575 | | - | |
1576 | | - | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
1577 | 1583 | | |
1578 | 1584 | | |
1579 | 1585 | | |
| |||
1741 | 1747 | | |
1742 | 1748 | | |
1743 | 1749 | | |
1744 | | - | |
1745 | | - | |
| 1750 | + | |
| 1751 | + | |
1746 | 1752 | | |
1747 | 1753 | | |
1748 | 1754 | | |
| |||
0 commit comments