btrfs: refactor block group replication factor calculation to a helper
authorDavid Sterba <dsterba@suse.com>
Fri, 13 Jul 2018 18:46:30 +0000 (20:46 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 6 Aug 2018 11:12:53 +0000 (13:12 +0200)
commit46df06b85e28eaf430aa5c8f8aa26120fa746b72
tree274185638f029f3be8da1ab56d2f84bbd98943e1
parent321a4bf72b251319aa456ea542161729442b6f61
btrfs: refactor block group replication factor calculation to a helper

There are many places that open code the duplicity factor of the block
group profiles, create a common helper. This can be easily extended for
more copies.

Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c
fs/btrfs/super.c
fs/btrfs/volumes.c
fs/btrfs/volumes.h