md-raid-utilities / mdadm

Manager of Linux Software RAID implemented through Multiple Devices driver.
https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git
GNU General Public License v2.0
26 stars 13 forks source link

imsm: save checkpoint prior to exit #85

Closed mku514k closed 2 months ago

mku514k commented 3 months ago

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 occured.

Move SIGTERM handling at the end of the loop to allow saving checkpoint (and state) so reshapes can be properly resumed.