]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: simplify data stripe calculation helpers
authorDavid Sterba <dsterba@suse.com>
Mon, 26 Jul 2021 12:15:24 +0000 (14:15 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Aug 2021 11:19:03 +0000 (13:19 +0200)
commit5a9bad26441add647d7e8b8760ebcef79f31f94c
tree574b87ff59d57aa5cdd6c41af428d76faca992ce
parent0cf2f67ac2e8cd9505bb6171f9c1bc083adff11b
btrfs: simplify data stripe calculation helpers

There are two helpers doing the same calculations based on nparity and
ncopies. calc_data_stripes can be simplified into one expression, so far
we don't have profile with both copies and parity, so there's no
effective change. calc_stripe_length should reuse the helper and not
repeat the same calculation.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c