diff options
author | 2022-03-11 15:38:41 +0800 | |
---|---|---|
committer | 2022-05-16 17:17:30 +0200 | |
commit | 1194a82481d8f37892e0362b7e77d3627f51d017 (patch) | |
tree | c87592ced04a3f294c826737671903fff1313214 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | btrfs: turn fs_roots_radix in btrfs_fs_info into an XArray (diff) | |
download | linux-dev-1194a82481d8f37892e0362b7e77d3627f51d017.tar.xz linux-dev-1194a82481d8f37892e0362b7e77d3627f51d017.zip |
btrfs: calculate physical_end using dev_extent_len directly in scrub_stripe()
The variable @physical_end is the exclusive stripe end, currently it's
calculated using @physical + @dev_extent_len / map->stripe_len *
map->stripe_len.
And since at allocation time we ensured dev_extent_len is stripe_len
aligned, the result is the same as @physical + @dev_extent_len.
So this patch will just assign @physical and @physical_end early,
without using @nstripes.
This is especially helpful for any possible out: label user, as now we
only need to initialize @offset before going to out: label.
Since we're here, also make @physical_end constant.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions