[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 14 of 23] libxl: use libxl__device in libxl_devices_destroy and libxl__device_pci_remove_xenstore



On Fri, 2011-10-07 at 13:24 +0100, Ian Campbell wrote:
> On Fri, 2011-10-07 at 13:18 +0100, Roger Pau Monnà wrote:
> > 2011/9/30 Ian Campbell <ian.campbell@xxxxxxxxxx>:
> 
> > > @@ -445,22 +467,27 @@ int libxl__devices_destroy(libxl__gc *gc
> > >         num1 = 0;
> > >     }
> > >     for (i = 0; i < num1; i++) {
> > > -        if (!strcmp("vfs", l1[i]))
> > > +        if (libxl__device_kind_from_string(l1[i], &kind))
> > > +            continue;
> > > +        if (kind == LIBXL__DEVICE_KIND_VBD)
> > >             continue;
> > 
> > This should not be there, or hotplug scripts for VBD device types are
> > not called. I know Linux doesn't need to call hotplug scripts for VBD,
> > but NetBSD does. Should we add some kind of helper function or ifdef,
> > or is it safe to remove this and handle VBD devices normally?
> 
> This is a bug -- I removed a check for "vfs" and replaced it with one
> for "vbd" which is not the same!
> 
> "vfs" was the fs-backend thing which was remove by 22716:3c78729b6f06 so
> I think the check can just be removed and I will do so in the next
> posting

incremental version:

diff -r 2bf50dc113d4 tools/libxl/libxl_device.c
--- a/tools/libxl/libxl_device.c        Fri Oct 07 13:24:45 2011 +0100
+++ b/tools/libxl/libxl_device.c        Fri Oct 07 13:25:28 2011 +0100
@@ -469,8 +469,6 @@ int libxl__devices_destroy(libxl__gc *gc
     for (i = 0; i < num1; i++) {
         if (libxl__device_kind_from_string(l1[i], &kind))
             continue;
-        if (kind == LIBXL__DEVICE_KIND_VBD)
-            continue;
         path = libxl__sprintf(gc, "/local/domain/%d/device/%s", domid, l1[i]);
         l2 = libxl__xs_directory(gc, XBT_NULL, path, &num2);
         if (!l2)



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.