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

[Xen-devel] [PATCH] libxl: fix block attach with non-dom0 backend



libxl: fix block attach with non-dom0 backend

When backend!=dom0 there is no simple way to get major:minor numbers. So just
no verify it and leave filling it to hotplug script (as xend does).

Signed-off-by: Marek Marczykowski <marmarek@xxxxxxxxxxxxxxxxxxxxxx>

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -959,9 +959,11 @@ int libxl_device_disk_add(libxl_ctx *ctx
         case LIBXL_DISK_BACKEND_PHY:
             dev = disk->pdev_path;
     do_backend_phy:
-            libxl__device_physdisk_major_minor(dev, &major, &minor);
-            flexarray_append(back, "physical-device");
-            flexarray_append(back, libxl__sprintf(&gc, "%x:%x", major, minor));
+            if (disk->backend_domid == 0) {
+                libxl__device_physdisk_major_minor(dev, &major, &minor);
+                flexarray_append(back, "physical-device");
+                flexarray_append(back, libxl__sprintf(&gc, "%x:%x", major, 
minor));
+            }
 
             flexarray_append(back, "params");
             flexarray_append(back, dev);



_______________________________________________
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®.