diff mbox series

[14/15] btrfs-progs: don't pretend RAID56 has a different stripe length

Message ID 20200610123258.12382-15-johannes.thumshirn@wdc.com (mailing list archive)
State New, archived
Headers show
Series btrfs-progs: simplify chunk allocation a bit | expand

Commit Message

Johannes Thumshirn June 10, 2020, 12:32 p.m. UTC
Since it's addition in 2009 BTRFS RAID5/6 uses a constant stripe length
and we're lacking the meta-data to define a per stripe length, so it's
unlikely to change in the near future for RAID5/6.

So let's not pretend something we don't do and remove the RAID5/6 stripe
length special casing.

Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 volumes.c | 11 -----------
 1 file changed, 11 deletions(-)
diff mbox series

Patch

diff --git a/volumes.c b/volumes.c
index aacff6e0656b..ec31acd57aa7 100644
--- a/volumes.c
+++ b/volumes.c
@@ -900,13 +900,6 @@  static u64 chunk_bytes_by_type(u64 type, u64 calc_size,
 		return calc_size * ctl->num_stripes;
 }
 
-
-static u32 find_raid56_stripe_len(u32 data_devices, u32 dev_stripe_target)
-{
-	/* TODO, add a way to store the preferred stripe size */
-	return BTRFS_STRIPE_LEN;
-}
-
 /*
  * btrfs_device_avail_bytes - count bytes available for alloc_chunk
  *
@@ -1092,13 +1085,9 @@  static void init_alloc_chunk_ctl(struct btrfs_fs_info *info,
 		break;
 	case BTRFS_RAID_RAID5:
 		ctl->num_stripes = min(ctl->max_stripes, ctl->total_devs);
-		ctl->stripe_len = find_raid56_stripe_len(ctl->num_stripes - 1,
-				    btrfs_super_stripesize(info->super_copy));
 		break;
 	case BTRFS_RAID_RAID6:
 		ctl->num_stripes = min(ctl->max_stripes, ctl->total_devs);
-		ctl->stripe_len = find_raid56_stripe_len(ctl->num_stripes - 2,
-				    btrfs_super_stripesize(info->super_copy));
 		break;
 	default:
 		break;