[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] hotplug scripts: better same_vm checks
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |