From: Daniel Hokka Zakrisson Date: Wed, 5 Dec 2007 14:17:26 +0000 (+0000) Subject: Need to set the tagging too so disk limits are enforceable. X-Git-Tag: util-vserver-pl-0.1-1~11 X-Git-Url: http://git.onelab.eu/?p=util-vserver-pl.git;a=commitdiff_plain;h=3b6742b9259c30570a2e36b13ce0ffd7ce49a823 Need to set the tagging too so disk limits are enforceable. --- diff --git a/src/planetlab.c b/src/planetlab.c index 293d0a7..1c6cbcc 100644 --- a/src/planetlab.c +++ b/src/planetlab.c @@ -57,7 +57,7 @@ create_context(xid_t ctx, uint64_t bcaps) /* Create network context */ if (vc_net_create(ctx) == VC_NOCTX) { if (errno == EEXIST) - goto process; + goto tag; return -1; } @@ -66,6 +66,11 @@ create_context(xid_t ctx, uint64_t bcaps) if (vc_set_nflags(ctx, &vc_nf)) return -1; +tag: + /* Create tag context */ + if (vc_tag_create(ctx) == VC_NOCTX) + return -1; + process: /* * Create context info - this sets the STATE_SETUP and STATE_INIT flags. @@ -157,7 +162,7 @@ pl_chcontext(xid_t ctx, uint64_t bcaps, const struct sliver_resources *slr) migrate: if (net_migrated || !vc_net_migrate(ctx)) { - if (!vc_ctx_migrate(ctx, 0)) + if (!vc_tag_migrate(ctx) && !vc_ctx_migrate(ctx, 0)) break; /* done */ net_migrated = 1; }