From: Sukadev Bhattiprolu <sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
To: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
Cc: Containers
<containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
Subject: [PATCH 2/2] Add keep_frozen field to struct app_restart_args
Date: Tue, 30 Mar 2010 23:56:02 -0700 [thread overview]
Message-ID: <20100331065602.GA21318@us.ibm.com> (raw)
In-Reply-To: <20100331065443.GA21065-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
From: Sukadev Bhattiprolu <sukadev-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Date: Tue, 30 Mar 2010 23:14:53 -0700
Subject: [PATCH 2/2] Add keep_frozen field to struct app_restart_args
Add a field, keep_frozen that callers of app_restart() can use to leave the
application frozen after restart. When this field is set, have app_restart()
set the RESTART_FROZEN flag to sys_restart().
TODO:
For now, this field will be used in LXC containers. A follow-on
patch would add a command line option to /bin/restart to let users
select this behavior.
---
app-checkpoint.h | 3 +++
restart.c | 2 +-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/app-checkpoint.h b/app-checkpoint.h
index f740085..d2455f3 100644
--- a/app-checkpoint.h
+++ b/app-checkpoint.h
@@ -1,3 +1,5 @@
+#include <linux/checkpoint.h>
+#include <linux/checkpoint_hdr.h>
struct app_checkpoint_args {
int outfd;
@@ -19,6 +21,7 @@ struct app_restart_args {
int show_status;
int copy_status;
char *freezer;
+ int keep_frozen;
int infd;
int klogfd;
int ulogfd;
diff --git a/restart.c b/restart.c
index 5408152..d5fee0b 100644
--- a/restart.c
+++ b/restart.c
@@ -914,7 +914,7 @@ static int ckpt_coordinator(struct ckpt_ctx *ctx)
if (ckpt_probe_child(root_pid, "root task") < 0)
exit(1);
- if (ctx->args->freezer)
+ if (ctx->args->freezer || ctx->args->keep_frozen)
flags |= RESTART_FROZEN;
if (ctx->args->keep_lsm)
flags |= RESTART_KEEP_LSM;
--
1.6.6.1
next prev parent reply other threads:[~2010-03-31 6:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-31 6:54 [PATCH 1/2] Fix app_checkpoint() return code Sukadev Bhattiprolu
[not found] ` <20100331065443.GA21065-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-03-31 6:56 ` Sukadev Bhattiprolu [this message]
2010-04-01 4:59 ` Oren Laadan
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=20100331065602.GA21318@us.ibm.com \
--to=sukadev-23vcf4htsmix0ybbhkvfkdbpr1lh4cv8@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.