[lkml]   [2009]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 18/38] C/R: core stuff
On Thu, May 28, 2009 at 06:20:25PM -0400, Oren Laadan wrote:
> Alexey Dobriyan wrote:
> > Price in loose case is strictly bigger than price in strict case
> > because set of loose states is strict superset of set of strict cases.
> The code to enforce full-container approach is a *superset* of the
> code without this requirement.
> If you can checkpoint a full container, surely you can checkpoint a
> sub-hierarchy of processes.


To checkpoint uts_ns reliably, in strict case, one doesn't even need

In loose case, one needs uts_sem.

static int dump_uts_ns(struct kstate_context *ctx, struct kstate_object *obj)
struct uts_namespace *uts_ns = obj->o_obj;
struct kstate_image_uts_ns *i;
int rv;

i = kstate_prepare_image(KSTATE_OBJ_UTS_NS, sizeof(*i));
if (!i)
return -ENOMEM;

if (ctx->dump_live)
strncpy(i->sysname, (const char *)uts_ns->name.sysname, 64);
strncpy(i->nodename, (const char *)uts_ns->name.nodename, 64);
strncpy(i->release, (const char *)uts_ns->name.release, 64);
strncpy(i->version, (const char *)uts_ns->name.version, 64);
strncpy(i->machine, (const char *)uts_ns->name.machine, 64);
strncpy(i->domainname, (const char *)uts_ns->name.domainname, 64);
if (ctx->dump_live)

rv = kstate_write_image(ctx, i, sizeof(*i), obj);
return rv;

 \ /
  Last update: 2009-05-29 08:03    [W:0.074 / U:3.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site