WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] libxl: do not create /vss and /xapi paths

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxl: do not create /vss and /xapi paths in xenstore.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 25 Jul 2010 01:45:38 -0700
Delivery-date: Sun, 25 Jul 2010 01:46:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1279902959 -3600
# Node ID 267ddd7fa11f7a63f5c6ca0b9ecb1c60f03b39cf
# Parent  4814e16ea4105502332407e3379c49da92018899
libxl: do not create /vss and /xapi paths in xenstore.

libxl doesn't know anything about these paths and there is no reason
it needs to manage them.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/libxl/libxl.c        |   22 +++-------------------
 tools/libxl/libxl_device.c |   18 ++----------------
 2 files changed, 5 insertions(+), 35 deletions(-)

diff -r 4814e16ea410 -r 267ddd7fa11f tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Fri Jul 23 17:34:35 2010 +0100
+++ b/tools/libxl/libxl.c       Fri Jul 23 17:35:59 2010 +0100
@@ -87,7 +87,7 @@ int libxl_domain_make(struct libxl_ctx *
     char *rw_paths[] = { "device", "device/suspend/event-channel" , "data"};
     char *ro_paths[] = { "cpu", "memory", "device", "error", "drivers",
                          "control", "attr", "messages" };
-    char *dom_path, *vm_path, *vss_path;
+    char *dom_path, *vm_path;
     struct xs_permissions roperm[2];
     struct xs_permissions rwperm[1];
     xs_transaction_t t;
@@ -121,8 +121,7 @@ int libxl_domain_make(struct libxl_ctx *
         return ERROR_FAIL;
 
     vm_path = libxl_sprintf(ctx, "/vm/%s", uuid_string);
-    vss_path = libxl_sprintf(ctx, "/vss/%s", uuid_string);
-    if (!vm_path || !vss_path) {
+    if (!vm_path) {
         XL_LOG(ctx, XL_LOG_ERROR, "cannot allocate create paths");
         return ERROR_FAIL;
     }
@@ -144,12 +143,7 @@ retry_transaction:
     xs_mkdir(ctx->xsh, t, vm_path);
     xs_set_permissions(ctx->xsh, t, vm_path, roperm, ARRAY_SIZE(roperm));
 
-    xs_rm(ctx->xsh, t, vss_path);
-    xs_mkdir(ctx->xsh, t, vss_path);
-    xs_set_permissions(ctx->xsh, t, vss_path, rwperm, ARRAY_SIZE(rwperm));
-
     xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/vm", dom_path), vm_path, 
strlen(vm_path));
-    xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/vss", dom_path), vss_path, 
strlen(vss_path));
     rc = libxl_domain_rename(ctx, *domid, 0, info->name, t);
     if (rc) return rc;
 
@@ -787,7 +781,7 @@ int libxl_domain_destroy(struct libxl_ct
 int libxl_domain_destroy(struct libxl_ctx *ctx, uint32_t domid, int force)
 {
     char *dom_path;
-    char *vm_path, *vss_path, *xapi_path;
+    char *vm_path;
     int rc, dm_present;
 
     if (is_hvm(ctx, domid)) {
@@ -826,18 +820,8 @@ int libxl_domain_destroy(struct libxl_ct
         if (!xs_rm(ctx->xsh, XBT_NULL, vm_path))
             XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "xs_rm failed for %s", vm_path);
 
-    vss_path = libxl_xs_read(ctx, XBT_NULL, libxl_sprintf(ctx, "%s/vss", 
dom_path));
-    if (vss_path)
-        if (!xs_rm(ctx->xsh, XBT_NULL, vss_path))
-            XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "xs_rm failed for %s", vss_path);
-
     if (!xs_rm(ctx->xsh, XBT_NULL, dom_path))
         XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "xs_rm failed for %s", dom_path);
-
-    xapi_path = libxl_sprintf(ctx, "/xapi/%u", domid);
-    if (xapi_path)
-        if (!xs_rm(ctx->xsh, XBT_NULL, xapi_path))
-            XL_LOG_ERRNO(ctx, XL_LOG_ERROR, "xs_rm failed for %s", xapi_path);
 
     libxl__userdata_destroyall(ctx, domid);
 
diff -r 4814e16ea410 -r 267ddd7fa11f tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c        Fri Jul 23 17:34:35 2010 +0100
+++ b/tools/libxl/libxl_device.c        Fri Jul 23 17:35:59 2010 +0100
@@ -42,11 +42,10 @@ int libxl_device_generic_add(struct libx
 int libxl_device_generic_add(struct libxl_ctx *ctx, libxl_device *device,
                              char **bents, char **fents)
 {
-    char *dom_path_backend, *dom_path, *frontend_path, *backend_path, 
*hotplug_path;
+    char *dom_path_backend, *dom_path, *frontend_path, *backend_path;
     xs_transaction_t t;
     struct xs_permissions frontend_perms[2];
     struct xs_permissions backend_perms[2];
-    struct xs_permissions hotplug_perms[1];
 
     if (!is_valid_device_kind(device->backend_kind) || 
!is_valid_device_kind(device->kind))
         return ERROR_INVAL;
@@ -58,8 +57,6 @@ int libxl_device_generic_add(struct libx
                                   dom_path, string_of_kinds[device->kind], 
device->devid);
     backend_path = libxl_sprintf(ctx, "%s/backend/%s/%u/%d",
                                  dom_path_backend, 
string_of_kinds[device->backend_kind], device->domid, device->devid);
-    hotplug_path = libxl_sprintf(ctx, "/xapi/%d/hotplug/%s/%d",
-                                  device->domid, 
string_of_kinds[device->kind], device->devid);
 
     frontend_perms[0].id = device->domid;
     frontend_perms[0].perms = XS_PERM_NONE;
@@ -71,9 +68,6 @@ int libxl_device_generic_add(struct libx
     backend_perms[1].id = device->domid;
     backend_perms[1].perms = XS_PERM_READ;
 
-    hotplug_perms[0].id = device->backend_domid;
-    hotplug_perms[0].perms = XS_PERM_NONE;
-
 retry_transaction:
     t = xs_transaction_start(ctx->xsh);
     /* FIXME: read frontend_path and check state before removing stuff */
@@ -86,9 +80,6 @@ retry_transaction:
 
     xs_mkdir(ctx->xsh, t, backend_path);
     xs_set_permissions(ctx->xsh, t, backend_path, backend_perms, 
ARRAY_SIZE(backend_perms));
-
-    xs_mkdir(ctx->xsh, t, hotplug_path);
-    xs_set_permissions(ctx->xsh, t, hotplug_path, hotplug_perms, 
ARRAY_SIZE(hotplug_perms));
 
     xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/backend", frontend_path), 
backend_path, strlen(backend_path));
     xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/frontend", backend_path), 
frontend_path, strlen(frontend_path));
@@ -353,7 +344,7 @@ int libxl_devices_destroy(struct libxl_c
 
 int libxl_device_del(struct libxl_ctx *ctx, libxl_device *dev, int wait)
 {
-    char *dom_path_backend, *backend_path, *hotplug_path;
+    char *dom_path_backend, *backend_path;
     int rc;
     struct libxl_ctx clone;
 
@@ -367,10 +358,6 @@ int libxl_device_del(struct libxl_ctx *c
                                     dom_path_backend, 
                                     string_of_kinds[dev->backend_kind], 
                                     dev->domid, dev->devid);
-    hotplug_path        = libxl_sprintf(&clone, "/xapi/%d/hotplug/%s/%d",
-                                    dev->domid,
-                                    string_of_kinds[dev->kind], 
-                                    dev->devid);
     libxl_free(&clone, dom_path_backend);
 
     rc = libxl_device_destroy(&clone, backend_path, !wait);
@@ -386,7 +373,6 @@ int libxl_device_del(struct libxl_ctx *c
         (void)wait_for_dev_destroy(&clone, &tv);
     }
 
-    xs_rm(clone.xsh, XBT_NULL, hotplug_path);
     libxl_ctx_free(&clone);
     return 0;
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxl: do not create /vss and /xapi paths in xenstore., Xen patchbot-unstable <=