Fix issues with the finish of monitoring a reshape.
1/ We need to clean up the backup file after the reshape finishes. 2/ We need to remove the suspended region and clear the resync controls after the resync finishes. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
9653307272
commit
223c5c999e
12
Grow.c
12
Grow.c
|
@ -2795,11 +2795,6 @@ static int child_monitor(int afd, struct mdinfo *sra, struct reshape *reshape,
|
|||
rv = progress_reshape(sra, reshape,
|
||||
backup_point, wait_point,
|
||||
&suspend_point, &reshape_completed);
|
||||
if (rv < 0) {
|
||||
done = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
/* external metadata would need to ping_monitor here */
|
||||
sra->reshape_progress = reshape_completed;
|
||||
|
||||
|
@ -2822,6 +2817,11 @@ static int child_monitor(int afd, struct mdinfo *sra, struct reshape *reshape,
|
|||
destoffsets, 1);
|
||||
}
|
||||
|
||||
if (rv < 0) {
|
||||
done = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (rv) {
|
||||
unsigned long long offset;
|
||||
/* need to backup some space... */
|
||||
|
@ -2849,6 +2849,8 @@ static int child_monitor(int afd, struct mdinfo *sra, struct reshape *reshape,
|
|||
}
|
||||
}
|
||||
|
||||
/* FIXME maybe call progress_reshape one more time instead */
|
||||
abort_reshape(sra); /* remove any remaining suspension */
|
||||
if (reshape->before.data_disks == reshape->after.data_disks)
|
||||
sysfs_set_num(sra, NULL, "sync_speed_min", speed);
|
||||
free(buf);
|
||||
|
|
Loading…
Reference in New Issue