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

[Xen-changelog] [xen master] Revert "libxl, hotplug/Linux: default to phy backend for raw format file"



commit 0119ce986098a388c8476856a659c89e303d176d
Author:     Ian Campbell <ian.campbell@xxxxxxxxxx>
AuthorDate: Mon Sep 16 14:29:47 2013 +0100
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Mon Sep 16 14:29:47 2013 +0100

    Revert "libxl, hotplug/Linux: default to phy backend for raw format file"
    
    This reverts commit 11a63a1660453269ddd1893c15d0a98133b33ca7. The change 
causes
    issues with live migration.
---
 tools/hotplug/Linux/block |   16 +++++++---------
 tools/libxl/libxl_linux.c |    6 +++---
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/tools/hotplug/Linux/block b/tools/hotplug/Linux/block
index 8d2ee9d..da26e22 100644
--- a/tools/hotplug/Linux/block
+++ b/tools/hotplug/Linux/block
@@ -206,13 +206,6 @@ and so cannot be mounted ${m2}${when}."
 
 
 t=$(xenstore_read_default "$XENBUS_PATH/type" 'MISSING')
-p=$(xenstore_read "$XENBUS_PATH/params")
-mode=$(xenstore_read "$XENBUS_PATH/mode")
-if [ -b "$p" ]; then
-    truetype="phy"
-elif [ -f "$p" ]; then
-    truetype="file"
-fi
 
 case "$command" in
   add)
@@ -224,11 +217,16 @@ case "$command" in
       exit 0
     fi
 
+    if [ -n "$t" ]
+    then
+      p=$(xenstore_read "$XENBUS_PATH/params")
+      mode=$(xenstore_read "$XENBUS_PATH/mode")
+    fi
     FRONTEND_ID=$(xenstore_read "$XENBUS_PATH/frontend-id")
     FRONTEND_UUID=$(xenstore_read_default \
             "/local/domain/$FRONTEND_ID/vm" 'unknown')
 
-    case $truetype in
+    case $t in 
       phy)
         dev=$(expand_dev $p)
 
@@ -321,7 +319,7 @@ mount it read-write in a guest domain."
     ;;
 
   remove)
-    case $truetype in
+    case $t in 
       phy)
        exit 0
        ;;
diff --git a/tools/libxl/libxl_linux.c b/tools/libxl/libxl_linux.c
index 3cfa6da..37815eb 100644
--- a/tools/libxl/libxl_linux.c
+++ b/tools/libxl/libxl_linux.c
@@ -19,11 +19,11 @@
  
 int libxl__try_phy_backend(mode_t st_mode)
 {
-    if (S_ISBLK(st_mode) || S_ISREG(st_mode)) {
-        return 1;
+    if (!S_ISBLK(st_mode)) {
+        return 0;
     }
 
-    return 0;
+    return 1;
 }
 
 #define EXT_SHIFT 28
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.