diff --git a/volumes.c b/volumes.c
index bd679bc..d10262a 100644
--- a/volumes.c
+++ b/volumes.c
@@ -4651,6 +4651,8 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
 	u64 num_bytes;
 	u64 raid_stripe_len = BTRFS_STRIPE_LEN;
 	int ndevs;
+	u64 fs_total_avail;
+	int ndevs_opt;
 	int i;
 	int j;
 	int index;
@@ -4710,6 +4712,7 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
 	 * about the available holes on each device.
 	 */
 	ndevs = 0;
+	fs_total_avail = 0;
 	while (cur != &fs_devices->alloc_list) {
 		struct btrfs_device *device;
 		u64 max_avail;
@@ -4760,6 +4763,7 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
 		devices_info[ndevs].total_avail = total_avail;
 		devices_info[ndevs].dev = device;
 		++ndevs;
+		fs_total_avail += total_avail;	/* overflow? */
 	}
 
 	/*
@@ -4768,6 +4772,15 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
 	sort(devices_info, ndevs, sizeof(struct btrfs_device_info),
 	     btrfs_cmp_device_info, NULL);
 
+	/*
+	 * limit the number of stripes as needed to maximise useable space
+	 * only happens if the free space isn't balanced between the drives
+	 */
+	if (ndevs > 0 && devices_info[0].total_avail > 0) {
+		ndevs_opt = (fs_total_avail*2 + devs_increment*devices_info[0].total_avail)/(devices_info[0].total_avail*2);
+		ndevs = clamp_val(ndevs_opt, devs_min, ndevs);
+	}
+
 	/* round down to number of usable stripes */
 	ndevs -= ndevs % devs_increment;
 
