remove unnecessary code and doc
This commit is contained in:
@@ -67,18 +67,27 @@ type ISCSICommand struct {
|
||||
ExpCmdSN, MaxCmdSN uint32
|
||||
AHSLen int
|
||||
|
||||
ConnID uint16 // Connection ID.
|
||||
CmdSN uint32 // Command serial number.
|
||||
ExpStatSN uint32 // Expected status serial.
|
||||
// Connection ID.
|
||||
ConnID uint16
|
||||
// Command serial number.
|
||||
CmdSN uint32
|
||||
// Expected status serial.
|
||||
ExpStatSN uint32
|
||||
|
||||
Read, Write bool
|
||||
LUN [8]uint8
|
||||
Transit bool // Transit bit.
|
||||
Cont bool // Continue bit.
|
||||
CSG, NSG Stage // Current Stage, Next Stage.
|
||||
ISID uint64 // Initiator part of the SSID.
|
||||
TSIH uint16 // Target-assigned Session Identifying Handle.
|
||||
StatSN uint32 // Status serial number.
|
||||
// Transit bit.
|
||||
Transit bool
|
||||
// Continue bit.
|
||||
Cont bool
|
||||
// Current Stage, Next Stage.
|
||||
CSG, NSG Stage
|
||||
// Initiator part of the SSID.
|
||||
ISID uint64
|
||||
// Target-assigned Session Identifying Handle.
|
||||
TSIH uint16
|
||||
// Status serial number.
|
||||
StatSN uint32
|
||||
|
||||
// For login response.
|
||||
StatusClass uint8
|
||||
|
||||
@@ -70,15 +70,18 @@ type ISCSIRedirectInfo struct {
|
||||
}
|
||||
|
||||
type iSCSITPGT struct {
|
||||
TPGT uint16 /* Mapping to SCSI Reltive Target Port ID */
|
||||
// Mapping to SCSI Reltive Target Port ID
|
||||
TPGT uint16
|
||||
Portals map[string]struct{}
|
||||
}
|
||||
|
||||
type ISCSITarget struct {
|
||||
api.SCSITarget
|
||||
api.SCSITargetDriverCommon
|
||||
TPGTs map[uint16]*iSCSITPGT /* Key is a TPGT number */
|
||||
Sessions map[uint16]*ISCSISession /* Key is an TSIH */
|
||||
// TPGT number is the key
|
||||
TPGTs map[uint16]*iSCSITPGT
|
||||
// TSIH is the key
|
||||
Sessions map[uint16]*ISCSISession
|
||||
SessionParam []ISCSISessionParam
|
||||
Alias string
|
||||
MaxSessions int
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
/*
|
||||
Copyright 2016 The GoStor Authors All rights reserved.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
package iscsit
|
||||
|
||||
type ISCSIPortal struct {
|
||||
Address string
|
||||
Port int
|
||||
Tpgt int
|
||||
Fd int
|
||||
Af int
|
||||
}
|
||||
@@ -192,31 +192,6 @@ func (tq *taskQueue) Pop() interface{} {
|
||||
return item
|
||||
}
|
||||
|
||||
// The BHS is 48 bytes long. The Opcode and DataSegmentLength fields
|
||||
// appear in all iSCSI PDUs. In addition, when used, the Initiator Task
|
||||
// Tag and Logical Unit Number always appear in the same location in the
|
||||
// header.
|
||||
type iscsiHeader struct {
|
||||
opcode uint8
|
||||
flags uint8 // Final bit
|
||||
rsvd2 [2]uint8
|
||||
hlength uint8 // AHSs total length
|
||||
dlength [3]uint8 // Data length
|
||||
lun [8]uint8
|
||||
itt uint8 // Initiator Task Tag
|
||||
ttt uint8 // Target Task Tag
|
||||
statsn uint8
|
||||
expStatSN uint8
|
||||
maxStatSN uint8
|
||||
other [12]uint8
|
||||
}
|
||||
|
||||
type iscsiPdu struct {
|
||||
bhs iscsiHeader
|
||||
ahsSize uint
|
||||
dataSize uint
|
||||
}
|
||||
|
||||
// New creates a new session.
|
||||
func (s *ISCSITargetDriver) NewISCSISession(conn *iscsiConnection, isid uint64) (*ISCSISession, error) {
|
||||
var (
|
||||
|
||||
Reference in New Issue
Block a user