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

[Xen-changelog] Make disconnect/destroy messages from xend to the backend drivers wait for



ChangeSet 1.1563, 2005/05/26 16:11:08+01:00, akw27@xxxxxxxxxxxxxxxxxxxxxx

        Make disconnect/destroy messages from xend to the backend drivers wait 
for 
        responses to allow backends to shut down the connection properly.



 blkif.py |    6 ++++--
 netif.py |    6 ++++--
 usbif.py |    5 +++--
 3 files changed, 11 insertions(+), 6 deletions(-)


diff -Nru a/tools/python/xen/xend/server/blkif.py 
b/tools/python/xen/xend/server/blkif.py
--- a/tools/python/xen/xend/server/blkif.py     2005-05-26 12:01:43 -04:00
+++ b/tools/python/xen/xend/server/blkif.py     2005-05-26 12:01:43 -04:00
@@ -103,14 +103,16 @@
         msg = packMsg('blkif_be_disconnect_t',
                       { 'domid'        : self.frontendDomain,
                         'blkif_handle' : self.id })
-        self.backendChannel.writeRequest(msg)
+        self.backendChannel.requestResponse(msg)
+        #todo: check return status
         self.connected = False
 
     def send_be_destroy(self):
         msg = packMsg('blkif_be_destroy_t',
                       { 'domid'        : self.frontendDomain,
                         'blkif_handle' : self.id })
-        self.backendChannel.writeRequest(msg)
+        self.backendChannel.requestResponse(msg)
+        #todo: check return status
 
     def connectInterface(self, val):
         self.openEvtchn()
diff -Nru a/tools/python/xen/xend/server/netif.py 
b/tools/python/xen/xend/server/netif.py
--- a/tools/python/xen/xend/server/netif.py     2005-05-26 12:01:43 -04:00
+++ b/tools/python/xen/xend/server/netif.py     2005-05-26 12:01:43 -04:00
@@ -313,13 +313,15 @@
         msg = packMsg('netif_be_disconnect_t',
                       { 'domid'        : self.frontendDomain,
                         'netif_handle' : self.vif })
-        return self.backendChannel.writeRequest(msg)
+        self.backendChannel.requestResponse(msg)
+        #todo: check return status
 
     def send_be_destroy(self, response=None):
         msg = packMsg('netif_be_destroy_t',
                       { 'domid'        : self.frontendDomain,
                         'netif_handle' : self.vif })
-        return self.backendChannel.writeRequest(msg)
+        self.backendChannel.requestResponse(msg)
+        #todo: check return status
     
     def recv_fe_interface_connect(self, val):
         self.openEvtchn()
diff -Nru a/tools/python/xen/xend/server/usbif.py 
b/tools/python/xen/xend/server/usbif.py
--- a/tools/python/xen/xend/server/usbif.py     2005-05-26 12:01:43 -04:00
+++ b/tools/python/xen/xend/server/usbif.py     2005-05-26 12:01:43 -04:00
@@ -89,13 +89,14 @@
         log.debug('>UsbifBackendController>send_be_disconnect> %s', str(self))
         msg = packMsg('usbif_be_disconnect_t',
                       { 'domid'        : self.frontendDomain })
-        self.backendChannel.writeRequest(msg)
+        self.backendChannel.requestResponse(msg)
 
     def send_be_destroy(self, response=None):
         log.debug('>UsbifBackendController>send_be_destroy> %s', str(self))
         msg = packMsg('usbif_be_destroy_t',
                       { 'domid'        : self.frontendDomain })
-        self.backendChannel.writeRequest(msg, response=response)
+        self.backendChannel.requestResponse(msg)
+        #todo: check return status
 
     
     def connectInterface(self, val):

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


 


Rackspace

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