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

[Xen-devel] [PATCH] Remove device information when VmError occurred

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Remove device information when VmError occurred
From: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Date: Mon, 21 Jan 2008 22:45:11 +0900
Delivery-date: Mon, 21 Jan 2008 05:46:25 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

I tested xm block-attach command with a wrong parameter(file:). 
Naturally a command error occurred. 
Then I retested xm block-attach command with a correct parameter(phy:). 
But a command error occurred again. 
The second command error occurred because Xend did not remove device 
information from self.info when the first command error occurred. 

# xm block-attach vm1 file:/dev/hda4 hdb1 w
Error: Device 833 (vbd) could not be connected. /dev/hda4 does not exist.
Usage: xm block-attach <Domain> <BackDev> <FrontDev> <Mode> [BackDomain]

Create a new virtual block device.
# xm block-attach vm1 phy:/dev/hda4 hdb1 w
Error: The file "/dev/hda4" is already used
Usage: xm block-attach <Domain> <BackDev> <FrontDev> <Mode> [BackDomain]

Create a new virtual block device.
# xm block-list vm1
Vdev  BE handle state evt-ch ring-ref BE-path
769    0    0     4      6      8     /local/domain/0/backend/vbd/1/769
#


This patch fixes the issue.  The test result is as follows. 

# xm block-attach vm1 file:/dev/hda4 hdb1 w
Error: Device 833 (vbd) could not be connected. /dev/hda4 does not exist.
Usage: xm block-attach <Domain> <BackDev> <FrontDev> <Mode> [BackDomain]

Create a new virtual block device.
# xm block-attach vm1 phy:/dev/hda4 hdb1 w
# xm block-list vm1
Vdev  BE handle state evt-ch ring-ref BE-path
769    0    0     4      6      8     /local/domain/0/backend/vbd/2/769
833    0    0     4      8      833   /local/domain/0/backend/vbd/2/833
#


Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>

Best regards,
 Kan

Attachment: remove_devinfo.patch
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Remove device information when VmError occurred, Masaki Kanno <=