convert initialR2T to always true for datadigest
tttttt-off-by: Utkarsh Mani Tripathi <utkarsh.tripathi@mayadata.io>
This commit is contained in:
@@ -164,6 +164,7 @@ func (conn *iscsiConnection) buildRespPackage(oc OpCode, task *iscsiTask) error
|
|||||||
case OpReady:
|
case OpReady:
|
||||||
conn.resp.OpCode = OpReady
|
conn.resp.OpCode = OpReady
|
||||||
conn.resp.R2TSN = task.r2tSN
|
conn.resp.R2TSN = task.r2tSN
|
||||||
|
conn.resp.Final = true
|
||||||
conn.resp.BufferOffset = uint32(task.offset)
|
conn.resp.BufferOffset = uint32(task.offset)
|
||||||
conn.resp.DesiredLength = uint32(task.r2tCount)
|
conn.resp.DesiredLength = uint32(task.r2tCount)
|
||||||
if val := conn.loginParam.sessionParam[ISCSI_PARAM_MAX_BURST].Value; task.r2tCount > int(val) {
|
if val := conn.loginParam.sessionParam[ISCSI_PARAM_MAX_BURST].Value; task.r2tCount > int(val) {
|
||||||
|
|||||||
@@ -188,7 +188,9 @@ var sessionKeys map[string]*iscsiSessionKeys = map[string]*iscsiSessionKeys{
|
|||||||
// ISCSI_PARAM_HDRDGST_EN
|
// ISCSI_PARAM_HDRDGST_EN
|
||||||
"HeaderDigest": {ISCSI_PARAM_HDRDGST_EN, false, DIGEST_NONE, DIGEST_NONE, DIGEST_ALL, digestKeyConv, digestKeyInConv},
|
"HeaderDigest": {ISCSI_PARAM_HDRDGST_EN, false, DIGEST_NONE, DIGEST_NONE, DIGEST_ALL, digestKeyConv, digestKeyInConv},
|
||||||
// ISCSI_PARAM_DATADGST_EN
|
// ISCSI_PARAM_DATADGST_EN
|
||||||
"DataDigest": {ISCSI_PARAM_DATADGST_EN, false, DIGEST_NONE, DIGEST_NONE, DIGEST_ALL, digestKeyConv, digestKeyInConv},
|
// TODO: Not sure why initialR2T was changed to true, need help in
|
||||||
|
// understanding it's use?
|
||||||
|
"DataDigest": {ISCSI_PARAM_DATADGST_EN, true, DIGEST_NONE, DIGEST_NONE, DIGEST_ALL, digestKeyConv, digestKeyInConv},
|
||||||
// ISCSI_PARAM_INITIAL_R2T_EN
|
// ISCSI_PARAM_INITIAL_R2T_EN
|
||||||
"InitialR2T": {ISCSI_PARAM_INITIAL_R2T_EN, false, 1, 0, 1, boolKeyConv, boolKeyInConv},
|
"InitialR2T": {ISCSI_PARAM_INITIAL_R2T_EN, false, 1, 0, 1, boolKeyConv, boolKeyInConv},
|
||||||
// ISCSI_PARAM_MAX_R2T
|
// ISCSI_PARAM_MAX_R2T
|
||||||
|
|||||||
Reference in New Issue
Block a user