Linux Container Development
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
Subject: Re: [PATCH 2/3] c/r: kread/kwrite() to abort if CKPT_CTX_ERROR is set
Date: Wed, 9 Dec 2009 09:34:07 -0600	[thread overview]
Message-ID: <20091209153407.GA12496@us.ibm.com> (raw)
In-Reply-To: <1260130151-2500-1-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>

Quoting Oren Laadan (orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org):
> This is useful particularly in restart to force a task that is
> restoring to respond quickly to an error condition due to another
> task, instead of only detecting it when it completes (or fails).
> For example, when a restarting tasks activates the next task, and
> then fails.
> 
> Signed-off-by: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>

Hmm, true, that has obscured a few bugs for me already :)

thanks,
-serge

> ---
>  checkpoint/sys.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/checkpoint/sys.c b/checkpoint/sys.c
> index dbee469..afcfa1e 100644
> --- a/checkpoint/sys.c
> +++ b/checkpoint/sys.c
> @@ -65,6 +65,9 @@ int ckpt_kwrite(struct ckpt_ctx *ctx, void *addr, int count)
>  	mm_segment_t fs;
>  	int ret;
> 
> +	if (ckpt_test_ctx_error(ctx))
> +		return ckpt_get_error(ctx);
> +
>  	fs = get_fs();
>  	set_fs(KERNEL_DS);
>  	ret = _ckpt_kwrite(ctx->file, addr, count);
> @@ -102,6 +105,9 @@ int ckpt_kread(struct ckpt_ctx *ctx, void *addr, int count)
>  	mm_segment_t fs;
>  	int ret;
> 
> +	if (ckpt_test_ctx_error(ctx))
> +		return ckpt_get_error(ctx);
> +
>  	fs = get_fs();
>  	set_fs(KERNEL_DS);
>  	ret = _ckpt_kread(ctx->file , addr, count);
> -- 
> 1.6.3.3
> 
> _______________________________________________
> Containers mailing list
> Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
> https://lists.linux-foundation.org/mailman/listinfo/containers

      parent reply	other threads:[~2009-12-09 15:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-06 20:09 [PATCH 2/3] c/r: kread/kwrite() to abort if CKPT_CTX_ERROR is set Oren Laadan
     [not found] ` <1260130151-2500-1-git-send-email-orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
2009-12-09 15:34   ` Serge E. Hallyn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091209153407.GA12496@us.ibm.com \
    --to=serue-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox