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: handle the tail end of a tap devic

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxl: handle the tail end of a tap device using the phy backend handling code
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Sat, 09 Apr 2011 09:20:29 +0100
Delivery-date: Sat, 09 Apr 2011 01:28:03 -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 1302277219 -3600
# Node ID 17d39055197100ec981dd284b9d74f80800caf4d
# Parent  b49301d2de11b45de574894953d814cbaac0093c
libxl: handle the tail end of a tap device using the phy backend handling code

We are literally creating a phy backend on top of a blktap2 created
device anyway so we might as well reuse the code and make this
explicit.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r b49301d2de11 -r 17d390551971 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Fri Apr 08 16:39:53 2011 +0100
+++ b/tools/libxl/libxl.c       Fri Apr 08 16:40:19 2011 +0100
@@ -1000,7 +1000,7 @@
     switch (disk->backend) {
         case 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));
@@ -1021,17 +1021,11 @@
                 libxl__device_disk_string_of_format(disk->format),
                 disk->pdev_path));
 
-            flexarray_append(back, "params");
-            flexarray_append(back, dev);
-
             backend_type = "phy";
 
-            libxl__device_physdisk_major_minor(dev, &major, &minor);
-            flexarray_append(back, "physical-device");
-            flexarray_append(back, libxl__sprintf(&gc, "%x:%x", major, minor));
-
-            device.backend_kind = DEVICE_VBD;
-            break;
+            /* now create a phy device to export the device to the guest */
+            goto do_backend_phy;
+
         case DISK_BACKEND_QDISK:
             flexarray_append(back, "params");
             flexarray_append(back, libxl__sprintf(&gc, "%s:%s",

_______________________________________________
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: handle the tail end of a tap device using the phy backend handling code, Xen patchbot-unstable <=