fix array_size in child_monitor
The array_size we need to consider is the largest possible size of the array, which is a different calculation depending on whether the array is growing or shrinking. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
92d1991fff
commit
9653307272
3
Grow.c
3
Grow.c
|
@ -2758,11 +2758,12 @@ static int child_monitor(int afd, struct mdinfo *sra, struct reshape *reshape,
|
|||
sysfs_set_num(sra, NULL, "sync_speed_min", 200000);
|
||||
}
|
||||
|
||||
array_size = sra->component_size * data;
|
||||
if (increasing) {
|
||||
array_size = sra->component_size * reshape->after.data_disks;
|
||||
backup_point = sra->reshape_progress;
|
||||
suspend_point = 0;
|
||||
} else {
|
||||
array_size = sra->component_size * reshape->before.data_disks;
|
||||
backup_point = array_size;
|
||||
suspend_point = array_size;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue