[CRIU] [PATCH 2/2] rst: Introduce post-restore action

Andrew Vagin avagin at parallels.com
Tue Feb 4 11:07:15 PST 2014


On Tue, Feb 04, 2014 at 08:04:55PM +0400, Pavel Emelyanov wrote:
> On 02/04/2014 07:06 PM, Kir Kolyshkin wrote:
> > On 02/04/2014 06:03 AM, Pavel Emelyanov wrote:
> >> Useful to test restore time -- just abort restore with this
> >> action and that's it.
> >>
> >> Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
> >> ---
> >>   cr-restore.c | 7 +++++++
> >>   1 file changed, 7 insertions(+)
> >>
> >> diff --git a/cr-restore.c b/cr-restore.c
> >> index 0336aa7..2bd2879 100644
> >> --- a/cr-restore.c
> >> +++ b/cr-restore.c
> >> @@ -1518,6 +1518,13 @@ static int restore_root_task(struct pstree_item *init)
> >>   
> >>   	timing_stop(TIME_RESTORE);
> >>   
> >> +	ret = run_scripts("post-restore");
> >> +	if (ret != 0) {
> >> +		pr_warn("Aborting restore due to script ret code %d\n", ret);
> > Why not pr_err()?
> 
> This is not necessarily error. Script may just decide to abort restore
> for any reason other than "something went wrong".

I vote for the pr_err too.

> 
> >> +		write_stats(RESTORE_STATS);
> >> +		goto out_kill;
> >> +	}
> >> +
> >>   	ret = attach_to_tasks();
> >>   
> >>   	pr_info("Restore finished successfully. Resuming tasks.\n");
> > 
> > _______________________________________________
> > CRIU mailing list
> > CRIU at openvz.org
> > https://lists.openvz.org/mailman/listinfo/criu
> > 
> 
> 
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu


More information about the CRIU mailing list