Commit 5b870266 authored by Pavel Emelyanov's avatar Pavel Emelyanov Committed by Andrei Vagin

restore: Rename CR_STATE_RESTORE_NS -> _ROOT_TASK

The stage name is what tasks do, not what criu waits for.
When the first stage is started we want the root task to
come up, rather than namespaces to get restored.
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 6d9ec5ec
......@@ -125,7 +125,7 @@ static inline int stage_participants(int next_stage)
switch (next_stage) {
case CR_STATE_FAIL:
return 0;
case CR_STATE_RESTORE_NS:
case CR_STATE_ROOT_TASK:
case CR_STATE_POST_RESTORE_NS:
case CR_STATE_RESTORE_SHARED:
return 1;
......@@ -1517,7 +1517,7 @@ static int restore_task_with_children(void *_arg)
/* Wait prepare_userns */
if (current->parent == NULL &&
restore_finish_stage(task_entries, CR_STATE_RESTORE_NS) < 0)
restore_finish_stage(task_entries, CR_STATE_ROOT_TASK) < 0)
goto err;
/*
......@@ -1900,7 +1900,7 @@ static int restore_root_task(struct pstree_item *init)
if (prepare_namespace_before_tasks())
return -1;
__restore_switch_stage_nw(CR_STATE_RESTORE_NS);
__restore_switch_stage_nw(CR_STATE_ROOT_TASK);
ret = fork_with_pid(init);
if (ret < 0)
......
......@@ -201,7 +201,7 @@ static inline unsigned long restorer_stack(struct restore_mem_zone *mz)
enum {
CR_STATE_FAIL = -1,
CR_STATE_RESTORE_NS = 0, /* is used for executing "setup-namespace" scripts */
CR_STATE_ROOT_TASK = 0, /* is used for executing "setup-namespace" scripts */
/*
* Need to wait a mount namespace which
* will be used to clean up remap files.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment