remove unnecessary code and doc

This commit is contained in:
Lei Xue
2016-11-28 14:36:13 +08:00
parent 05b6f88de4
commit 82ae696822
10 changed files with 49 additions and 73 deletions

View File

@@ -153,7 +153,6 @@ const (
* device type values are reserved for this peripheral qualifier.
* 100b to 111b Vendor specific
*/
const (
PQ_DEVICE_CONNECTED = byte(0x00 << 5)
PQ_DEVICE_NOT_CONNECT = byte(0x01 << 5)

View File

@@ -87,7 +87,7 @@ func luPerformCommand(tid int, cmd *api.SCSICommand) api.SAMStat {
fn := cmd.Device.DeviceProtocol.PerformCommand(op)
if fn != nil {
fnop := fn.(SCSIDeviceOperation)
// host := cmd.ITNexus.Host
// TODO host := cmd.ITNexus.Host
host := 0
return fnop.CommandPerformFunc(host, cmd)
}

View File

@@ -1,3 +1,19 @@
/*
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 scsi
import (

View File

@@ -1,5 +1,5 @@
/*
Copyright 2015 The GoStor Authors All rights reserved.
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.
@@ -28,9 +28,11 @@ import (
type BackendType string
type SCSILUMap struct {
mutex sync.RWMutex
AllDevices api.LUNMap /* use UUID as the key for all LUs*/
TargetsLUNMap map[string]api.LUNMap /* use target name as the key for target's LUN map*/
mutex sync.RWMutex
// use UUID as the key for all LUs
AllDevices api.LUNMap
// use target name as the key for target's LUN map
TargetsLUNMap map[string]api.LUNMap
}
var globalSCSILUMap = SCSILUMap{AllDevices: make(api.LUNMap), TargetsLUNMap: make(map[string]api.LUNMap)}
@@ -85,7 +87,7 @@ func InitSCSILUMap(config *config.Config) error {
return errors.New("LU Number must be a number")
}
mappingLUN(deviceID, lun, tgtName)
//Init SCSISimpleReservationOperator
// Init SCSISimpleReservationOperator
op := GetSCSIReservationOperator()
if simpleOp, ok = op.(*SCSISimpleReservationOperator); ok {
simpleOp.InitLUReservation(tgtName, deviceID)

View File

@@ -1,5 +1,5 @@
/*
Copyright 2015 The GoStor Authors All rights reserved.
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.