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-changelog

[Xen-changelog] [xen-unstable] hotplug scripts: better same_vm checks

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] hotplug scripts: better same_vm checks
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 19 Aug 2009 07:40:22 -0700
Delivery-date: Wed, 19 Aug 2009 07:41:26 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1250683893 -3600
# Node ID c0576bd2ddfdfc7d6334b971490adfea60f6ee9f
# Parent  23678c44c3d348e538506eaf636af43fd9d7b2ff
hotplug scripts: better same_vm checks

currently the function same_vm in block-common.sh is the one
responsible for detecting if two block devices can be used at the same
time by two VMs. This can be allowed in few specific cases: when the
two VMs are actually the same VM and when the two VMs are the guest
and its stubdomain. We need to expand these exceptions to handle
properly save restore issues: this patch adds to the exceptions the
case when two VMs are the same VM because of save\restore races, and
when two VMs are the guest and the stubdomain of the previous guest,
again during save\restore.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
 tools/hotplug/Linux/block-common.sh |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletion(-)

diff -r 23678c44c3d3 -r c0576bd2ddfd tools/hotplug/Linux/block-common.sh
--- a/tools/hotplug/Linux/block-common.sh       Wed Aug 19 13:02:31 2009 +0100
+++ b/tools/hotplug/Linux/block-common.sh       Wed Aug 19 13:11:33 2009 +0100
@@ -112,6 +112,14 @@ same_vm()
                   "$FRONTEND_UUID")
   local target=$(xenstore_read_default  "/local/domain/$FRONTEND_ID/target"   \
                  "-1")
-  [ "$FRONTEND_UUID" = "$othervm" -o "$target" = "$otherdom" ]
+  local otarget=$(xenstore_read_default  "/local/domain/$otherdom/target"   \
+                 "-1")
+  local otvm=$(xenstore_read_default  "/local/domain/$otarget/vm"   \
+                 "-1")
+  otvm=${otvm%-1}
+  othervm=${othervm%-1}
+  local frontend_uuid=${FRONTEND_UUID%-1}
+  
+  [ "$frontend_uuid" = "$othervm" -o "$target" = "$otherdom" -o 
"$frontend_uuid" = "$otvm" ]
 }
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] hotplug scripts: better same_vm checks, Xen patchbot-unstable <=