diff options
| author | Qu Wenruo <wqu@suse.com> | 2026-02-20 14:11:50 +1030 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2026-04-07 18:55:59 +0200 |
| commit | c4bc2dd32c63a70ed948ed9927ea2c46f7c5b454 (patch) | |
| tree | c6a2e2573351ba9d4d15f6b61d4066d7e7b05ce3 /tools/perf/scripts/python/bin/task-analyzer-record | |
| parent | 8c0b917d78fc2a1fb4afac90a597b75e0a5b7223 (diff) | |
btrfs: introduce a common helper to calculate the size of a bio
We have several call sites doing the same work to calculate the size of
a bio:
struct bio_vec *bvec;
u32 bio_size = 0;
int i;
bio_for_each_bvec_all(bvec, bio, i)
bio_size += bvec->bv_len;
We can use a common helper instead of open-coding it everywhere.
This also allows us to constify the @bio_size variables used in all the
call sites.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/task-analyzer-record')
0 files changed, 0 insertions, 0 deletions
