summaryrefslogtreecommitdiff
path: root/check
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2018-02-09 15:44:26 +0800
committerDavid Sterba <dsterba@suse.com>2018-03-06 11:28:26 +0100
commit2ac42077c2d0edf5fc74c7ccff6b2fb71b3d7ff6 (patch)
tree292d20b25ea6bb92d80648fe10ee9acd879cdb93 /check
parentf174972d2dd1f2e6c9ca62839061782a22971070 (diff)
btrfs-progs: Move chunk stripe size calculation function to volumes.h
Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'check')
-rw-r--r--check/main.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/check/main.c b/check/main.c
index 97baae58..8ad7ab03 100644
--- a/check/main.c
+++ b/check/main.c
@@ -7638,28 +7638,6 @@ repair_abort:
return err;
}
-u64 calc_stripe_length(u64 type, u64 length, int num_stripes)
-{
- u64 stripe_size;
-
- if (type & BTRFS_BLOCK_GROUP_RAID0) {
- stripe_size = length;
- stripe_size /= num_stripes;
- } else if (type & BTRFS_BLOCK_GROUP_RAID10) {
- stripe_size = length * 2;
- stripe_size /= num_stripes;
- } else if (type & BTRFS_BLOCK_GROUP_RAID5) {
- stripe_size = length;
- stripe_size /= (num_stripes - 1);
- } else if (type & BTRFS_BLOCK_GROUP_RAID6) {
- stripe_size = length;
- stripe_size /= (num_stripes - 2);
- } else {
- stripe_size = length;
- }
- return stripe_size;
-}
-
/*
* Check the chunk with its block group/dev list ref:
* Return 0 if all refs seems valid.