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

[Xen-devel] [PATCH] xend: fix BlktapController's device creation

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] xend: fix BlktapController's device creation
From: "Ryan O'Connor" <rjo@xxxxxxxxx>
Date: Thu, 18 Jun 2009 17:25:58 -0700
Cc: Dutch Meyer <dmeyer@xxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Thu, 18 Jun 2009 17:28:13 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Reset BlktapController's device class back to 'tap' once the device has
been created. This fixes save/restore for VMs with blktap2 disks.

Signed-off-by: Ryan O'Connor <rjo@xxxxxxxxx>
Signed-off-by: Dutch Meyer <dmeyer@xxxxxxxxx>

diff -r 55ca7ef865b4 -r b3be5993ab7c 
tools/python/xen/xend/server/BlktapController.py
--- a/tools/python/xen/xend/server/BlktapController.py  Tue Jun 16 11:01:17 
2009 +0100
+++ b/tools/python/xen/xend/server/BlktapController.py  Thu Jun 18 17:05:47 
2009 -0700
@@ -149,6 +149,8 @@ class BlktapController(BlkifController):
         #modify the configuration to attach as a vbd, now that the
         #device is configured.  Then continue to create the device
         config.update({'uname' : 'phy:' + device.rstrip()})
+
         self.deviceClass='vbd'
-
-        return BlkifController.createDevice(self, config);
+        devid = BlkifController.createDevice(self, config)
+        self.deviceClass='tap'
+        return devid

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] xend: fix BlktapController's device creation, Ryan O'Connor <=