2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 14:25:49 +00:00

restore: Kill CR_STATE_RESTORE_SHARED

Looks like this separate stage is not needed. The scripts
involved in ns restore are synchronized with existing stages
like this:

criu:                    root task:
ROOT_TASK stage
                         <appear>
"setup-ns" script
PREPARE_NAMESPACES
                         prepare_namespace()
"post-setup-ns" script
FORKING
                         restore_task_mnt_ns()
                         <everything else>

which seems to be OK.

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Pavel Emelyanov
2017-04-28 15:28:55 +03:00
committed by Andrei Vagin
parent 16214d99ee
commit eb43ea2389
2 changed files with 2 additions and 10 deletions

View File

@@ -127,7 +127,6 @@ static inline int stage_participants(int next_stage)
return 0;
case CR_STATE_ROOT_TASK:
case CR_STATE_PREPARE_NAMESPACES:
case CR_STATE_RESTORE_SHARED:
return 1;
case CR_STATE_FORKING:
return task_entries->nr_tasks + task_entries->nr_helpers;
@@ -1569,9 +1568,6 @@ static int restore_task_with_children(void *_arg)
if (root_prepare_shared())
goto err;
if (restore_finish_stage(task_entries, CR_STATE_RESTORE_SHARED) < 0)
goto err;
}
if (restore_task_mnt_ns(current))
@@ -1970,15 +1966,12 @@ static int restore_root_task(struct pstree_item *init)
goto out_kill;
}
timing_start(TIME_FORK);
ret = restore_switch_stage(CR_STATE_RESTORE_SHARED);
if (ret < 0)
goto out_kill;
ret = run_scripts(ACT_POST_SETUP_NS);
if (ret)
goto out_kill;
timing_start(TIME_FORK);
ret = restore_switch_stage(CR_STATE_FORKING);
if (ret < 0)
goto out_kill;

View File

@@ -207,7 +207,6 @@ enum {
* will be used to clean up remap files.
*/
CR_STATE_PREPARE_NAMESPACES,
CR_STATE_RESTORE_SHARED,
CR_STATE_FORKING,
CR_STATE_RESTORE,
CR_STATE_RESTORE_SIGCHLD,