mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
bitkeeper revision 1.1421.2.1 (428d0172Mlrhy6MiEsOJ6GtVjT0HPg)
Little blkif interface and xend fixes to make parallax work again. Also minor debug printing fix to blktap. Signed-off-by: andrew.warfield@cl.cam.ac.uk
This commit is contained in:
1 parent
33ab556179
commit
90a17e697b
8 files changed
+60
-33
No files matched your search
@@ -624,6 +624,7 @@ static PyObject *xu_message_get_payload(PyObject *self, PyObject *args)
|
||||
C2P(blkif_be_vbd_create_t, domid, Int, Long);
|
||||
C2P(blkif_be_vbd_create_t, blkif_handle, Int, Long);
|
||||
C2P(blkif_be_vbd_create_t, pdevice, Int, Long);
|
||||
C2P(blkif_be_vbd_create_t, dev_handle, Int, Long);
|
||||
C2P(blkif_be_vbd_create_t, vdevice, Int, Long);
|
||||
C2P(blkif_be_vbd_create_t, readonly, Int, Long);
|
||||
C2P(blkif_be_vbd_create_t, status, Int, Long);
|
||||
@@ -843,6 +844,7 @@ static PyObject *xu_message_new(PyObject *self, PyObject *args)
|
||||
P2C(blkif_be_vbd_create_t, domid, u32);
|
||||
P2C(blkif_be_vbd_create_t, blkif_handle, u32);
|
||||
P2C(blkif_be_vbd_create_t, pdevice, blkif_pdev_t);
|
||||
P2C(blkif_be_vbd_create_t, dev_handle, u32);
|
||||
P2C(blkif_be_vbd_create_t, vdevice, blkif_vdev_t);
|
||||
P2C(blkif_be_vbd_create_t, readonly, u16);
|
||||
break;
|
||||
|
||||
@@ -30,7 +30,8 @@ def block(op, type, dets, script=None):
|
||||
raise ValueError('Invalid operation:' + op)
|
||||
|
||||
# Special case phy devices - they don't require any (un)binding
|
||||
if type == 'phy':
|
||||
# Parallax also doesn't need script-based binding.
|
||||
if (type == 'phy') or (type == 'parallax'):
|
||||
return dets
|
||||
|
||||
if script is None:
|
||||
|
||||
@@ -166,6 +166,7 @@ class BlkDev(Dev):
|
||||
self.params = None
|
||||
self.node = None
|
||||
self.device = None
|
||||
self.dev_handle = 0
|
||||
self.start_sector = None
|
||||
self.nr_sectors = None
|
||||
|
||||
@@ -232,12 +233,12 @@ class BlkDev(Dev):
|
||||
# NOTE:
|
||||
# This clause is testing code for storage system experiments.
|
||||
# Add a new disk type that will just pass an opaque id in the
|
||||
# start_sector and use an experimental device type.
|
||||
# dev_handle and use an experimental device type.
|
||||
# Please contact andrew.warfield@cl.cam.ac.uk with any concerns.
|
||||
if self.type == 'parallax':
|
||||
self.node = node
|
||||
self.device = 61440 # (240,0)
|
||||
self.start_sector = long(self.params)
|
||||
self.dev_handle = long(self.params)
|
||||
self.nr_sectors = long(0)
|
||||
return
|
||||
# done.
|
||||
@@ -330,6 +331,7 @@ class BlkDev(Dev):
|
||||
{ 'domid' : self.frontendDomain,
|
||||
'blkif_handle' : self.backendId,
|
||||
'pdevice' : self.device,
|
||||
'dev_handle' : self.dev_handle,
|
||||
'vdevice' : self.vdev,
|
||||
'readonly' : self.readonly() })
|
||||
msg = self.backendChannel.requestResponse(msg)
|
||||
|
||||