OSDN Git Service

btrfs: read stripe len directly in btrfs_rmap_block
authorNikolay Borisov <nborisov@suse.com>
Fri, 3 Apr 2020 13:40:34 +0000 (16:40 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 27 Jul 2020 10:55:20 +0000 (12:55 +0200)
commit9e22b925985e71c6acf0dba03f9b99a56806a137
tree3c2e7d246b3aa04376f15ec1dfbd4045165cc3e1
parent6a3c7f5c87854e948c3c234e5f5e745c7c553722
btrfs: read stripe len directly in btrfs_rmap_block

extent_map::orig_block_len contains the size of a physical stripe when
it's used to describe block groups (calculated in read_one_chunk via
calc_stripe_length or calculated in decide_stripe_size and then assigned
to extent_map::orig_block_len in create_chunk). Exploit this fact to get
the size directly rather than opencoding the calculations. No functional
changes.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.c