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] Fix blktap2 test in xen-hotplug-cleanup

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix blktap2 test in xen-hotplug-cleanup
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 22 Feb 2010 02:15:20 -0800
Delivery-date: Mon, 22 Feb 2010 02:16:45 -0800
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 1266833247 0
# Node ID 70d974c2401d2f44cb0a7b2e34f8f20c267c433f
# Parent  243614f8360c3aac8d73cd59d1cbc2765bf4b53d
Fix blktap2 test in xen-hotplug-cleanup

The blktap2 test in xen-hotplug-cleanup was not quite right, causing
orphaned /vm/<uuid>/device node in xenstore.  Attempt to reattach the
device failed:

xen53: # xm block-attach 0 file:/tmp/d0 /dev/xvdp r
xen53: # xm block-detach 0 /dev/xvdp
xen53: # xenstore-ls /vm/00000000-0000-0000-0000-000000000000/device
vbd =3D ""
 51952 =3D ""
  frontend =3D "/local/domain/0/device/vbd/51952"
  frontend-id =3D "0"
  backend-id =3D "0"
  backend =3D "/local/domain/0/backend/vbd/0/51952"
xen53: # xm block-attach 0 file:/tmp/d0 /dev/xvdp r
Error: Device /dev/xvdp (51952, vbd) is already connected.
Usage: xm block-attach <Domain> <BackDev> <FrontDev> <Mode>
[BackDomain]

From: Jim Fehlig <jfehlig@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/hotplug/Linux/xen-hotplug-cleanup |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 243614f8360c -r 70d974c2401d tools/hotplug/Linux/xen-hotplug-cleanup
--- a/tools/hotplug/Linux/xen-hotplug-cleanup   Mon Feb 22 10:06:21 2010 +0000
+++ b/tools/hotplug/Linux/xen-hotplug-cleanup   Mon Feb 22 10:07:27 2010 +0000
@@ -21,7 +21,7 @@ if [ "$vm" != "" ]; then
 
   # if the vm path does not exist and the device class is 'vbd' then we may 
have
   # a tap2 device
-  if [ ! $(xenstore-read "vm_dev" 2>/dev/null) ] \
+  if [ $(xenstore-read "$vm_dev" 2>/dev/null) != "" ] \
        && [ "${path_array[1]}" = "vbd" ]; then
     vm_dev="$vm/device/tap2/${path_array[3]}"
   fi

_______________________________________________
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] Fix blktap2 test in xen-hotplug-cleanup, Xen patchbot-unstable <=