Need to set the tagging too so disk limits are enforceable.
authorDaniel Hokka Zakrisson <dhokka@cs.princeton.edu>
Wed, 5 Dec 2007 14:17:26 +0000 (14:17 +0000)
committerDaniel Hokka Zakrisson <dhokka@cs.princeton.edu>
Wed, 5 Dec 2007 14:17:26 +0000 (14:17 +0000)
src/planetlab.c

index 293d0a7..1c6cbcc 100644 (file)
@@ -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;
        }