Hi Bart, On Sat, Dec 03, 2016 at 09:14:16PM +0530, Varun Prakash wrote: > Hi Nicholas, > > On Fri, Sep 16, 2016 at 09:56:38PM +0530, Varun Prakash wrote: > > In case of unsolicited data for the first > > sequence seq_end_offset must be set to > > minimum of firstburstlength and total data length. > > > > Signed-off-by: Varun Prakash <varun@xxxxxxxxxxx> > > --- > > drivers/target/iscsi/iscsi_target_erl0.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/target/iscsi/iscsi_target_erl0.c b/drivers/target/iscsi/iscsi_target_erl0.c > > index b54e72c..98dff74 100644 > > --- a/drivers/target/iscsi/iscsi_target_erl0.c > > +++ b/drivers/target/iscsi/iscsi_target_erl0.c > > @@ -44,10 +44,10 @@ void iscsit_set_dataout_sequence_values( > > */ > > if (cmd->unsolicited_data) { > > cmd->seq_start_offset = cmd->write_data_done; > > - cmd->seq_end_offset = (cmd->write_data_done + > > - ((cmd->se_cmd.data_length > > > + cmd->seq_end_offset = (cmd->se_cmd.data_length > > > conn->sess->sess_ops->FirstBurstLength) ? > > - conn->sess->sess_ops->FirstBurstLength : cmd->se_cmd.data_length)); > > + conn->sess->sess_ops->FirstBurstLength : > > + cmd->se_cmd.data_length; > > return; > > } > > > > If I set ImmediateData=Yes, InitialR2T=No, MaxXmitDataSegmentLength < FirstBurstLength > on the target and issue a WRITE cmd (IO size > FirstBurstLength) from initiator then > target prints sequence error messages, for example > > Set following parameters on target (linux-4.8.12) > ImmediateData = Yes > InitialR2T = No > MaxXmitDataSegmentLength = 8k > FirstBurstLength = 64k > > Log in from Open iSCSI initiator and execute > dd if=/dev/zero of=/dev/sdb bs=128k count=1 oflag=direct > > Error messages on target > Command ITT: 0x00000035 with Offset: 65536, Length: 8192 outside of Sequence 73728:131072 while DataSequenceInOrder=Yes. > Command ITT: 0x00000035, received DataSN: 0x00000001 higher than expected 0x00000000. > Unable to perform within-command recovery while ERL=0. > > Is the above patch a correct fix for this bug? > Please review this patch. Thanks Varun -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html