You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.3 KiB
45 lines
1.3 KiB
2 months ago
|
From dd0d193ad8722140e240c95a4fd1e214077dd719 Mon Sep 17 00:00:00 2001
|
||
|
From: Mateusz Kusiak <mateusz.kusiak@intel.com>
|
||
|
Date: Mon, 2 Sep 2024 12:27:56 -0400
|
||
|
Subject: [PATCH 168/201] imsm: save checkpoint prior to exit
|
||
|
|
||
|
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>
|
||
|
---
|
||
|
super-intel.c | 5 +++--
|
||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/super-intel.c b/super-intel.c
|
||
|
index 744715d5..30c2939a 100644
|
||
|
--- a/super-intel.c
|
||
|
+++ b/super-intel.c
|
||
|
@@ -12631,8 +12631,6 @@ static int imsm_manage_reshape(
|
||
|
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
|
||
|
@@ -12641,6 +12639,9 @@ static int imsm_manage_reshape(
|
||
|
goto abort;
|
||
|
}
|
||
|
|
||
|
+ if (sigterm)
|
||
|
+ goto abort;
|
||
|
+
|
||
|
}
|
||
|
|
||
|
/* clear migr_rec on disks after successful migration */
|
||
|
--
|
||
|
2.41.0
|
||
|
|