Hi all, 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@eu.citrix.com> --- diff -r 8b0f1f37e145 tools/hotplug/Linux/block-common.sh --- a/tools/hotplug/Linux/block-common.sh Sun Aug 16 08:46:08 2009 +0100 +++ b/tools/hotplug/Linux/block-common.sh Tue Aug 18 17:32:27 2009 +0100 @@ -112,6 +112,14 @@ "$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-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel