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] Some fix for xm scsi-attach

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Some fix for xm scsi-attach
From: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Date: Mon, 09 Mar 2009 18:37:09 +0900
Delivery-date: Mon, 09 Mar 2009 02:37:35 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

Some bugs are included in xm scsi-attach command currently.
For example...

# xm scsi-list vm1
Idx BE  state host  phy-hctl   phy   vir-hctl   devstate
0   0   4     0     0:0:0:0    sda   0:0:0:0    4   
0   0   4     0     0:0:0:1    sdb   0:0:0:1    4   
# xm scsi-attach vm1 0:0:0:0 0:0:0:0  <---- (1)
Error: The virtual device 0:0:0:0 is already defined
Usage: xm scsi-attach <Domain> <PhysDevice> <VirtDevice> [BackDomain]

Attach a new SCSI device.
# xm scsi-attach vm1 0:0:0:1 0:0:0:1  <---- (2)
# xm scsi-list vm1
Idx BE  state host  phy-hctl   phy   vir-hctl   devstate
0   0   4     0     0:0:0:0    sda   0:0:0:0    4   
0   0   4     0     0:0:0:1    sdb   0:0:0:1    4   

(1) The error occurred.  Right!
(2) The error didn't occur.  Wrong!


# xm scsi-list vm1
Idx BE  state host  phy-hctl   phy   vir-hctl   devstate
1   0   4     0     0:0:0:9    sdj   1:0:0:9    4   
# xm scsi-attach vm1 1:0:0:0 host
# xm scsi-list vm1
Idx BE  state host  phy-hctl   phy   vir-hctl   devstate
1   0   4     1     0:0:0:9    sdj   1:0:0:9    4   <---- (3)
1   0   4     1     1:0:0:2    sdm   1:0:0:2    4   
1   0   4     1     1:0:0:5    sdp   1:0:0:5    4   
1   0   4     1     1:0:0:1    sdl   1:0:0:1    4   
1   0   4     1     1:0:0:6    sdq   1:0:0:6    4   
1   0   4     1     1:0:0:4    sdo   1:0:0:4    4   
1   0   4     1     1:0:0:0    sdk   1:0:0:0    4   
1   0   4     1     1:0:0:8    sds   1:0:0:8    4   
1   0   4     1     1:0:0:3    sdn   1:0:0:3    4   
1   0   4     1     1:0:0:7    sdr   1:0:0:7    4   

(3) The host mode was changed without someone's permission.
    And an error didn't occur.  Wrong!


This patch fixes the bugs.

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

Best regards,
 Kan

Attachment: pvscsi_xm_scsi.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] Some fix for xm scsi-attach, Masaki Kanno <=