aboutsummaryrefslogtreecommitdiff
path: root/net/switchdev/switchdev.c
diff options
context:
space:
mode:
authorFilipe Manana <[email protected]>2024-02-17 22:23:02 +0000
committerDavid Sterba <[email protected]>2024-03-04 16:24:52 +0100
commit0e9e135e7c4bf90e9e5c14fe9fdedbb789df1604 (patch)
tree1d08470ea4f13ab664990ab5dfb9cf79b2eb3028 /net/switchdev/switchdev.c
parent0478adff0fae7555c10787470ae04390a8b45e12 (diff)
btrfs: send: avoid duplicated search for last extent when sending hole
During an incremental send, before determining if we need to send a hole (write operations full of zeroes) we will search for the last extent's end offset if we are at the first slot of a leaf and the last processed extent's end offset is smaller then the current extent's start offset. However we are repeating this search in case we had the last extent's end offset undefined (set to the (u64)-1 value) when we entered maybe_send_hole(), wasting time. So avoid this duplicated search by combining the two conditions that trigger a search for the last extent's end offset into a single if statement. Reviewed-by: Sweet Tea Dorminy <[email protected]> Reviewed-by: Josef Bacik <[email protected]> Signed-off-by: Filipe Manana <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions