rename: Thinprovisioning -> ThinProvisioning
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
{
|
||||
"deviceID":1000,
|
||||
"path":"file:/var/tmp/disk.img",
|
||||
"online":true
|
||||
"online":true,
|
||||
"thinProvisioning":false,
|
||||
"blockShift": 9,
|
||||
}
|
||||
],
|
||||
"iscsiportals":[
|
||||
|
||||
@@ -264,7 +264,7 @@ type SCSILuPhyAttribute struct {
|
||||
// Software Write Protect
|
||||
SWP bool
|
||||
// Use thin-provisioning for this LUN
|
||||
Thinprovisioning bool
|
||||
ThinProvisioning bool
|
||||
// Logical Unit online
|
||||
Online bool
|
||||
// Descrptor format sense data supported
|
||||
|
||||
@@ -104,7 +104,7 @@ type BackendStorage struct {
|
||||
DeviceID uint64 `json:"deviceID"`
|
||||
Path string `json:"path"`
|
||||
Online bool `json:"online"`
|
||||
Thinprovisioning bool `json:"thinprovisioning"`
|
||||
ThinProvisioning bool `json:"thinProvisioning"`
|
||||
BlockShift uint `json:"blockShift"`
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ func NewSCSILu(bs *config.BackendStorage) (*api.SCSILu, error) {
|
||||
}
|
||||
lu.Size = backing.Size(lu)
|
||||
lu.DeviceProtocol.InitLu(lu)
|
||||
lu.Attrs.Thinprovisioning = bs.Thinprovisioning
|
||||
lu.Attrs.ThinProvisioning = bs.ThinProvisioning
|
||||
lu.Attrs.Online = bs.Online
|
||||
lu.Attrs.Lbppbe = 3
|
||||
return lu, nil
|
||||
|
||||
@@ -59,7 +59,7 @@ func (sbc SBCSCSIDeviceProtocol) InitLu(lu *api.SCSILu) error {
|
||||
// init LU's phy attribute
|
||||
lu.Attrs.DeviceType = sbc.DeviceType
|
||||
lu.Attrs.Qualifier = false
|
||||
lu.Attrs.Thinprovisioning = false
|
||||
lu.Attrs.ThinProvisioning = false
|
||||
lu.Attrs.Removable = false
|
||||
lu.Attrs.Readonly = false
|
||||
lu.Attrs.SWP = false
|
||||
@@ -380,7 +380,7 @@ func SBCReadWrite(host int, cmd *api.SCSICommand) api.SAMStat {
|
||||
goto sense
|
||||
}
|
||||
// We only support unmap for thin provisioned LUNS
|
||||
if (scb[1]&0x08 != 0) && !dev.Attrs.Thinprovisioning {
|
||||
if (scb[1]&0x08 != 0) && !dev.Attrs.ThinProvisioning {
|
||||
key = ILLEGAL_REQUEST
|
||||
asc = ASC_INVALID_FIELD_IN_CDB
|
||||
goto sense
|
||||
@@ -623,7 +623,7 @@ func SBCReadCapacity16(host int, cmd *api.SCSICommand) api.SAMStat {
|
||||
copy(cmd.InSDBBuffer.Buffer[8:], util.MarshalUint32(uint32(1<<bshift)))
|
||||
if allocationLength > 16 {
|
||||
var lbpme int
|
||||
if cmd.Device.Attrs.Thinprovisioning {
|
||||
if cmd.Device.Attrs.ThinProvisioning {
|
||||
lbpme = 1
|
||||
}
|
||||
val := (cmd.Device.Attrs.Lbppbe << 16) | (lbpme << 15) | cmd.Device.Attrs.LowestAlignedLBA
|
||||
|
||||
@@ -196,7 +196,7 @@ func InquiryPage0xB0(host int, cmd *api.SCSICommand) (*bytes.Buffer, uint16) {
|
||||
maxUnmapBlockDescriptorCount uint32 = 0
|
||||
)
|
||||
|
||||
if cmd.Device.Attrs.Thinprovisioning {
|
||||
if cmd.Device.Attrs.ThinProvisioning {
|
||||
maxUnmapLbaCount = 0xFFFFFFFF
|
||||
maxUnmapBlockDescriptorCount = 0xFFFFFFFF
|
||||
}
|
||||
@@ -243,7 +243,7 @@ func InquiryPage0xB2(host int, cmd *api.SCSICommand) (*bytes.Buffer, uint16) {
|
||||
binary.Write(buf, binary.BigEndian, pageLength)
|
||||
|
||||
var lbpu byte
|
||||
if cmd.Device.Attrs.Thinprovisioning {
|
||||
if cmd.Device.Attrs.ThinProvisioning {
|
||||
lbpu = 1 << 7
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user