diff options
author | Christoph Hellwig <[email protected]> | 2024-08-26 19:37:57 +0200 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2024-08-29 04:32:32 -0600 |
commit | 1251580983f267e2e6b6505609a835119b68c513 (patch) | |
tree | 50aed8abde191727ac246b62bbb7fa7041eff93a /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 1e8a7f6af926e266cc1d7ac49b56bd064057d625 (diff) |
block: don't use bio_split_rw on misc operations
bio_split_rw is designed to split read and write bios with a payload.
Currently it is called by __bio_split_to_limits for all operations not
explicitly list, which works because bio_may_need_split explicitly checks
for bi_vcnt == 1 and thus skips the bypass if there is no payload and
bio_for_each_bvec loop will never execute it's body if bi_size is 0.
But all this is hard to understand, fragile and wasted pointless cycles.
Switch __bio_split_to_limits to only call bio_split_rw for READ and
WRITE command and don't attempt any kind split for operation that do not
require splitting.
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Damien Le Moal <[email protected]>
Tested-by: Hans Holmberg <[email protected]>
Reviewed-by: Hans Holmberg <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions