aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/netdev-times.py
diff options
context:
space:
mode:
authorNikolay Borisov <[email protected]>2020-04-03 16:40:35 +0300
committerDavid Sterba <[email protected]>2020-07-27 12:55:20 +0200
commit96f9b0f2fa01c96e90abd4e981208a341a5da66e (patch)
tree44dba05f021d54fbd265c61611e801ecc81f3b80 /tools/perf/scripts/python/netdev-times.py
parent9e22b925985e71c6acf0dba03f9b99a56806a137 (diff)
btrfs: simplify checks when adding excluded ranges
Adresses held in 'logical' array are always guaranteed to fall within the boundaries of the block group. That is, 'start' can never be smaller than cache->start. This invariant follows from the way the address are calculated in btrfs_rmap_block: stripe_nr = physical - map->stripes[i].physical; stripe_nr = div64_u64(stripe_nr, map->stripe_len); bytenr = chunk_start + stripe_nr * io_stripe_size; I.e it's always some IO stripe within the given chunk. Exploit this invariant to simplify the body of the loop by removing the unnecessary 'if' since its 'else' part is the one always executed. Signed-off-by: Nikolay Borisov <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions