aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/linear.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c
index ff83c9b5979e..b99c19c7eb22 100644
--- a/drivers/md/linear.c
+++ b/drivers/md/linear.c
@@ -162,7 +162,7 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks)
162 goto out; 162 goto out;
163 } 163 }
164 164
165 min_spacing = mddev->array_size; 165 min_spacing = conf->array_size;
166 sector_div(min_spacing, PAGE_SIZE/sizeof(struct dev_info *)); 166 sector_div(min_spacing, PAGE_SIZE/sizeof(struct dev_info *));
167 167
168 /* min_spacing is the minimum spacing that will fit the hash 168 /* min_spacing is the minimum spacing that will fit the hash
@@ -171,7 +171,7 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks)
171 * that is larger than min_spacing as use the size of that as 171 * that is larger than min_spacing as use the size of that as
172 * the actual spacing 172 * the actual spacing
173 */ 173 */
174 conf->hash_spacing = mddev->array_size; 174 conf->hash_spacing = conf->array_size;
175 for (i=0; i < cnt-1 ; i++) { 175 for (i=0; i < cnt-1 ; i++) {
176 sector_t sz = 0; 176 sector_t sz = 0;
177 int j; 177 int j;
@@ -228,7 +228,7 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks)
228 curr_offset = 0; 228 curr_offset = 0;
229 i = 0; 229 i = 0;
230 for (curr_offset = 0; 230 for (curr_offset = 0;
231 curr_offset < mddev->array_size; 231 curr_offset < conf->array_size;
232 curr_offset += conf->hash_spacing) { 232 curr_offset += conf->hash_spacing) {
233 233
234 while (i < mddev->raid_disks-1 && 234 while (i < mddev->raid_disks-1 &&