All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Dan Smith <danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org
Subject: Re: [PATCH] user-cr: Add --netns switch to user-cr checkpoint
Date: Mon, 5 Apr 2010 08:24:02 -0500	[thread overview]
Message-ID: <20100405132402.GD32049@us.ibm.com> (raw)
In-Reply-To: <1270215495-4371-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>

Quoting Dan Smith (danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org):
> This allows the caller to set the CHECKPOINT_NETNS flag on the checkpoint
> operation, thus triggering the checkpoint of network namespaces.
> 
> Signed-off-by: Dan Smith <danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>

Acked-by: Serge Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>

> ---
>  app-checkpoint.h  |    1 +
>  checkpoint-main.c |    8 +++++++-
>  2 files changed, 8 insertions(+), 1 deletions(-)
> 
> diff --git a/app-checkpoint.h b/app-checkpoint.h
> index f740085..c078f04 100644
> --- a/app-checkpoint.h
> +++ b/app-checkpoint.h
> @@ -5,6 +5,7 @@ struct app_checkpoint_args {
>  	int uerrfd;
>  	int container;
>  	int verbose;
> +	int flags;
>  };
> 
>  struct app_restart_args {
> diff --git a/checkpoint-main.c b/checkpoint-main.c
> index f6faa32..3fde9b6 100644
> --- a/checkpoint-main.c
> +++ b/checkpoint-main.c
> @@ -30,6 +30,7 @@ static char usage_str[] =
>  "  -l,--logfile=FILE     write error and debug data to FILE (default=none)\n"
>  "     --logile-fd=FD     write error and debug data to file descriptor FD\n"
>  "  -c,--container        require the PID is a container-init\n"
> +"  -N,--netns            checkpoint network namespace(s)\n"
>  "  -v,--verbose          verbose output\n"
>  "";
> 
> @@ -61,9 +62,10 @@ static void parse_args(struct app_checkpoint_args *args, int argc, char *argv[])
>  		{ "logfile-fd",	required_argument,	NULL, 2 },
>  		{ "container",	no_argument,		NULL, 'c' },
>  		{ "verbose",	no_argument,		NULL, 'v' },
> +		{ "netns",	no_argument,		NULL, 'N' },
>  		{ NULL,		0,			NULL, 0 }
>  	};
> -	static char optc[] = "hvco:l:";
> +	static char optc[] = "hvco:l:N";
>  	char *output;
>  	char *logfile;
> 
> @@ -109,6 +111,9 @@ static void parse_args(struct app_checkpoint_args *args, int argc, char *argv[])
>  		case 'v':
>  			args->verbose = 1;
>  			break;
> +		case 'N':
> +			args->flags |= CHECKPOINT_NETNS;
> +			break;
>  		default:
>  			usage(usage_str);
>  		}
> @@ -164,6 +169,7 @@ int main(int argc, char *argv[])
>  		exit(1);
>  	}
> 
> +	flags = args.flags;
>  	if (!args.container)
>  		flags |= CHECKPOINT_SUBTREE;
> 
> -- 
> 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:[~2010-04-05 13:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-02 13:38 [PATCH] user-cr: Add --netns switch to user-cr checkpoint Dan Smith
     [not found] ` <1270215495-4371-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-04-05 13:24   ` Serge E. Hallyn [this message]
     [not found]     ` <20100405132402.GD32049-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-04-25  4:51       ` 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=20100405132402.GD32049@us.ibm.com \
    --to=serue-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
    --cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
    --cc=danms-r/Jw6+rmf7HQT0dZR+AlfA@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.