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-devel

Re: [Xen-devel] [PATCH] libxl: added libxl compatibility with physical b

To: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] libxl: added libxl compatibility with physical backend file for NetBSD
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Fri, 22 Jul 2011 17:01:31 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 22 Jul 2011 09:04:18 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <c3d4cad0fc2d34c8346c.1311356214@loki>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <c3d4cad0fc2d34c8346c.1311356214@loki>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Fri, 2011-07-22 at 18:36 +0100, Roger Pau Monne wrote:
> @@ -455,6 +460,10 @@ int libxl__devices_destroy(libxl__gc *gc
>              fe_path = libxl__sprintf(gc, "/local/domain/%d/device/%s/%s", 
> domid, l1[i], l2[j]);
>              be_path = libxl__xs_read(gc, XBT_NULL, libxl__sprintf(gc, 
> "%s/backend", fe_path));
>              if (be_path != NULL) {
> +#ifdef DONT_REMOVE_VBD_FROM_STORE
> +                if (!strcmp(l1[i], "vbd"))
> +                    continue;
> +#endif
>                  if (libxl__device_destroy(gc, be_path, force) > 0)
>                      n_watches++;
>              } else { 

Most of this patch looks good but I'm still not convinced by this bit.

It misses the libxl_device_disk_del case which goes via
libxl__device_destroy path not libxl__devices_destroy, as well as
(maybe?) breaking the forced-destroy case (where the toolstack is
responsible for actually nuking everything without exceptions) but
really it's just that this special casing doesn't really pass the sniff
test and makes me suspect it is just papering over a more fundamental
issue somewhere else.

The Linux hotplug scripts also consults and then removes the backend dir
and it doesn't seem to cause visible issues, so what is it about
xenbackendd and/or the NetBSD scripts which doesn't like libxl's
behaviour I wonder? If there's a race there then perhaps Linux also has
the issue but in a benign form -- in which case it should be worth
putting a generic fix in instead of special casing NetBSD. If this
really is correct NetBSD specific behaviour then I think it needs a lot
more rationale in the changelog etc.

The libxl device teardown stuff is pretty convoluted and I'm reasonably
sure it is wrong in several respects, I've been meaning to untangle it,
perhaps I should get to that sooner rather than later and maybe fix this
issue as a side effect.

Ian.


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