libxl: do not write/maintain "pool_name" in XenStore
authorIan Campbell <ian.campbell@citrix.com>
Tue, 31 Jan 2012 14:39:57 +0000 (14:39 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 31 Jan 2012 14:39:57 +0000 (14:39 +0000)
Nothing that I can find ever reads this key.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: juergen.gross@ts.fujitsu.com
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
tools/libxl/libxl.c
tools/libxl/libxl_create.c

index 55f28e6fafbbc5d4c8275c12aa4d6f866813d738..ac858cdc7fa5dbb26b7c085de41992abe37e3bac 100644 (file)
@@ -3702,16 +3702,6 @@ int libxl_cpupool_movedomain(libxl_ctx *ctx, uint32_t poolid, uint32_t domid)
 {
     GC_INIT(ctx);
     int rc;
-    char *dom_path;
-    char *vm_path;
-    char *poolname;
-    xs_transaction_t t;
-
-    dom_path = libxl__xs_get_dompath(gc, domid);
-    if (!dom_path) {
-        GC_FREE;
-        return ERROR_FAIL;
-    }
 
     rc = xc_cpupool_movedomain(ctx->xch, poolid, domid);
     if (rc) {
@@ -3721,21 +3711,6 @@ int libxl_cpupool_movedomain(libxl_ctx *ctx, uint32_t poolid, uint32_t domid)
         return ERROR_FAIL;
     }
 
-    for (;;) {
-        t = xs_transaction_start(ctx->xsh);
-
-        poolname = libxl__cpupoolid_to_name(gc, poolid);
-        vm_path = libxl__xs_read(gc, XBT_NULL, libxl__sprintf(gc, "%s/vm", dom_path));
-        if (!vm_path)
-            break;
-
-        libxl__xs_write(gc, t, libxl__sprintf(gc, "%s/pool_name", vm_path),
-                        "%s", poolname);
-
-        if (xs_transaction_end(ctx->xsh, t, 0) || (errno != EAGAIN))
-            break;
-    }
-
     GC_FREE;
     return 0;
 }
index 53479dcf77d28595547d04a5bc1f63e3ee87878b..fcaf8fb9d916a706cef30a66aeb03fa42812f850 100644 (file)
@@ -441,9 +441,6 @@ retry_transaction:
 
     xs_write(ctx->xsh, t, libxl__sprintf(gc, "%s/uuid", vm_path), uuid_string, strlen(uuid_string));
     xs_write(ctx->xsh, t, libxl__sprintf(gc, "%s/name", vm_path), info->name, strlen(info->name));
-    if (info->poolid != -1)
-        libxl__xs_write(gc, t, libxl__sprintf(gc, "%s/pool_name", vm_path),
-                        "%s", libxl__cpupoolid_to_name(gc, info->poolid));
 
     libxl__xs_writev(gc, t, dom_path, info->xsdata);
     libxl__xs_writev(gc, t, libxl__sprintf(gc, "%s/platform", dom_path), info->platformdata);