iSCSI/SCSI multi port/ALUA support

fix ALUA flag issue
fix NNA flag issue
fix fixed format sense data builder issue
This commit is contained in:
Le Zhang
2016-10-14 16:46:34 +08:00
parent b9b9508817
commit 547faf684d
17 changed files with 333 additions and 107 deletions

View File

@@ -149,13 +149,14 @@ type SCSIDataBuffer struct {
}
type SCSICommand struct {
Target *SCSITarget
DeviceID uint64
Device *SCSILu
State uint64
Direction SCSIDataDirection
InSDBBuffer SCSIDataBuffer
OutSDBBuffer SCSIDataBuffer
Target *SCSITarget
DeviceID uint64
Device *SCSILu
State uint64
Direction SCSIDataDirection
InSDBBuffer SCSIDataBuffer
OutSDBBuffer SCSIDataBuffer
RelTargetPortID uint16
// Command ITN ID
CommandITNID uint64
Offset uint64
@@ -187,16 +188,26 @@ type ITNexusLuInfo struct {
Prevent int
}
type SCSITarget struct {
Name string `json:"name"`
TID int `json:"tid"`
LID int `json:"lid"`
State SCSITargetState `json:"state"`
Devices LUNMap `json:"-"`
LUN0 *SCSILu `json:"-"`
ITNexus []*ITNexus `json:"itnexus"`
type SCSITargetPort struct {
RelativeTargetPortID uint16
TargetPortName string
}
SCSITargetDriver interface{} `json:"-"`
type TargetPortGroup struct {
GroupID uint16
TargetPortGroup []*SCSITargetPort `json:"targetportgroup"`
}
type SCSITarget struct {
Name string `json:"name"`
TID int `json:"tid"`
LID int `json:"lid"`
State SCSITargetState `json:"state"`
Devices LUNMap `json:"-"`
LUN0 *SCSILu `json:"-"`
ITNexus []*ITNexus `json:"itnexus"`
TargetPortGroups []*TargetPortGroup `json:"tpg"`
SCSITargetDriver interface{} `json:"-"`
}
type SCSITargetDriverState int