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

[win-pv-devel] [PATCH 1/3] Read backend features and disk info before setting Connected



From: Owen Smith <owen.smith@xxxxxxxxxx>

Setting connected should be the last step of the connection
state transitions.

Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
---
 src/xenvbd/frontend.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/xenvbd/frontend.c b/src/xenvbd/frontend.c
index 1aec99e..b1fa1a9 100644
--- a/src/xenvbd/frontend.c
+++ b/src/xenvbd/frontend.c
@@ -1121,11 +1121,6 @@ abort:
     if (BackendState != XenbusStateConnected)
         goto fail7;
 
-    // Frontend: -> CONNECTED
-    Status = ___SetState(Frontend, XenbusStateConnected);
-    if (!NT_SUCCESS(Status))
-        goto fail8;
-
     // read disk info
     __ReadDiskInfo(Frontend);
     FrontendReadDiskInfo(Frontend);
@@ -1133,6 +1128,11 @@ abort:
     // blkback doesnt write features before InitWait, blkback writes features 
before Connected!
     FrontendReadFeatures(Frontend);
 
+    // Frontend: -> CONNECTED
+    Status = ___SetState(Frontend, XenbusStateConnected);
+    if (!NT_SUCCESS(Status))
+        goto fail8;
+
     return STATUS_SUCCESS;
 
 fail8:
-- 
2.8.3


_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel

 


Rackspace

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