If reshape (eg. chunksize migration) is gracefully stopped via SIGTERM
the checkpoint is not saved and reshape cannot be resumed due to "data
being present in copy area". This is because UNIT_SRC_NORMAL isn't set
if SIGTERM occurred.
Move SIGTERM handling at the end of the loop to allow saving checkpoint
(and state) so reshapes can be properly resumed.
Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
dprintf("wait_for_reshape_imsm returned error!\n");
goto abort;
}
- if (sigterm)
- goto abort;
if (save_checkpoint_imsm(st, sra, UNIT_SRC_NORMAL) == 1) {
/* ignore error == 2, this can mean end of reshape here
goto abort;
}
+ if (sigterm)
+ goto abort;
+
}
/* clear migr_rec on disks after successful migration */