aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorChristoph Hellwig <[email protected]>2023-06-28 17:31:30 +0200
committerDavid Sterba <[email protected]>2023-08-21 14:52:14 +0200
commit2c73162d649670045415537dc746f7524cda1405 (patch)
tree5ff4e80739d5f009f2aa18ba2249ddc91cf7f4e9 /tools/perf/scripts/python
parent0835d1e66e7f22428bbc2ea56cb488a7759b51e2 (diff)
btrfs: improve the delalloc_to_write calculation in writepage_delalloc
Currently writepage_delalloc adds to delalloc_to_write in every loop operation. That is not only more work than doing it once after the loop, but can also over-increment the counter due to rounding errors when a new loop iteration starts with an offset into a page. Add a new page_start variable instead of recaculation that value over and over, move the delalloc_to_write calculation out of the loop, use the DIV_ROUND_UP helper instead of open coding it and remove the pointless found local variable. Reviewed-by: Josef Bacik <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions