6148d71c1d
- Fix Monitor mode sometimes crashes when a resync completes - Fix missing symlink for mdadm container device when incremental creates the array - Make sure when creating a second array in a container that the second array uses all available space since leaving space for a third array is invalid - Validate the number of imsm volumes per controller - Fix issues with imsm arrays and disks larger than 2TB - Add support for expanding imsm arrays/containers - The support for expanding imsm arrays/containers was accepted upstream, update to the official patches from there - Fix for the issue of --add not being very smart - Fix an issue causing rebuilds to fail to restart on reboot (data corrupter level problem) - Reset the bad flag on map file updates - Correctly fix failure when trying to add internal bitmap to 1.0 arrays - Resolves: bz817023 (f17) bz817024 (f17) bz817026 (f17) bz817028 (f17) - Resolves: bz817029 (f17) bz817032 (f17) bz817038 (f17) bz808774 (f17) - Resolves: bz817039 (f17) bz817042 (f17) Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
48 lines
1.6 KiB
Diff
48 lines
1.6 KiB
Diff
From e03640bda562df11b60ceaaa40a56425f358090e Mon Sep 17 00:00:00 2001
|
|
From: "Czarnowska, Anna" <anna.czarnowska@intel.com>
|
|
Date: Mon, 2 Apr 2012 10:16:04 +1000
|
|
Subject: [PATCH 3/7] simplify calculating array_blocks
|
|
|
|
no point calling info_to_blocks_per_member when it just returns size*2 for level==1
|
|
calc_array_size can be used for all levels
|
|
|
|
Signed-off-by: Anna Czarnowska <anna.czarnowska@intel.com>
|
|
Signed-off-by: NeilBrown <neilb@suse.de>
|
|
---
|
|
super-intel.c | 5 +----
|
|
util.c | 2 ++
|
|
2 files changed, 3 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/super-intel.c b/super-intel.c
|
|
index 480b379..642ca26 100644
|
|
--- a/super-intel.c
|
|
+++ b/super-intel.c
|
|
@@ -4623,10 +4623,7 @@ static int init_super_imsm_volume(struct supertype *st, mdu_array_info_t *info,
|
|
}
|
|
|
|
strncpy((char *) dev->volume, name, MAX_RAID_SERIAL_LEN);
|
|
- if (info->level == 1)
|
|
- array_blocks = info_to_blocks_per_member(info, size);
|
|
- else
|
|
- array_blocks = calc_array_size(info->level, info->raid_disks,
|
|
+ array_blocks = calc_array_size(info->level, info->raid_disks,
|
|
info->layout, info->chunk_size,
|
|
size * 2);
|
|
/* round array size down to closest MB */
|
|
diff --git a/util.c b/util.c
|
|
index 7abbff7..d32e650 100644
|
|
--- a/util.c
|
|
+++ b/util.c
|
|
@@ -711,6 +711,8 @@ void print_r10_layout(int layout)
|
|
unsigned long long calc_array_size(int level, int raid_disks, int layout,
|
|
int chunksize, unsigned long long devsize)
|
|
{
|
|
+ if (level == 1)
|
|
+ return devsize;
|
|
devsize &= ~(unsigned long long)((chunksize>>9)-1);
|
|
return get_data_disks(level, layout, raid_disks) * devsize;
|
|
}
|
|
--
|
|
1.7.7.6
|
|
|