]>
git.hungrycats.org Git - linux/commit
btrfs: convert volumes.c and block-group.c to use map->stripe_len
There are still some BTRFS_STRIPE_LEN usage remaining, but they are all
for chunk allocation.
There is one more refactor for is_same_chunk_map(), as there are more
members to compare, the parameter list can go longer and longer.
Instead of passing a new @stripe_len member, pass extent_buffer and
btrfs_chunk pointers, and grab the needed member inside that function.
And doing "if (unlikely()) return false" for each member check.
Although this make is_same_chunk_map() more complex, considering it's
only called for system chunks, it should not bring too much overhead.
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>