* Patch "target/iscsi: Fix unsolicited data seq_end_offset calculation" has been added to the 4.4-stable tree
@ 2017-10-19 13:19 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-10-19 13:19 UTC (permalink / raw)
To: varun, alexander.levin, bart.vanassche, gregkh, nab
Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
target/iscsi: Fix unsolicited data seq_end_offset calculation
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
target-iscsi-fix-unsolicited-data-seq_end_offset-calculation.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From foo@baz Thu Oct 19 15:15:46 CEST 2017
From: Varun Prakash <varun@chelsio.com>
Date: Fri, 20 Jan 2017 16:44:33 +0530
Subject: target/iscsi: Fix unsolicited data seq_end_offset calculation
From: Varun Prakash <varun@chelsio.com>
[ Upstream commit 4d65491c269729a1e3b375c45e73213f49103d33 ]
In case of unsolicited data for the first sequence
seq_end_offset must be set to minimum of total data length
and FirstBurstLength, so do not add cmd->write_data_done
to the min of total data length and FirstBurstLength.
This patch avoids that with ImmediateData=Yes, InitialR2T=No,
MaxXmitDataSegmentLength < FirstBurstLength that a WRITE command
with IO size above FirstBurstLength triggers 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.
Signed-off-by: Varun Prakash <varun@chelsio.com>
[ bvanassche: Use min() instead of open-coding it / edited patch description ]
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/target/iscsi/iscsi_target_erl0.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
--- a/drivers/target/iscsi/iscsi_target_erl0.c
+++ b/drivers/target/iscsi/iscsi_target_erl0.c
@@ -44,10 +44,8 @@ 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 >
- conn->sess->sess_ops->FirstBurstLength) ?
- conn->sess->sess_ops->FirstBurstLength : cmd->se_cmd.data_length));
+ cmd->seq_end_offset = min(cmd->se_cmd.data_length,
+ conn->sess->sess_ops->FirstBurstLength);
return;
}
Patches currently in stable-queue which might be from varun@chelsio.com are
queue-4.4/target-iscsi-fix-unsolicited-data-seq_end_offset-calculation.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-10-19 13:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-19 13:19 Patch "target/iscsi: Fix unsolicited data seq_end_offset calculation" has been added to the 4.4-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).