summaryrefslogtreecommitdiff
path: root/drivers/target/iscsi/iscsi_target_tmr.c
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2012-09-30 09:14:51 +0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-10-03 00:17:32 +0400
commit1c417f39c1f896206f0d5bfec65cd61a8f5e69b8 (patch)
tree94860180b473678b9621545406ae3c9c36575a3e /drivers/target/iscsi/iscsi_target_tmr.c
parent21f5aa7eb8572b5cfe36884c23d306c72fe3987c (diff)
downloadlinux-1c417f39c1f896206f0d5bfec65cd61a8f5e69b8.tar.xz
iscsi-target: Add MaxXmitDataSegmentLength connection recovery check
The iSCSI TMR TASK_REASSIGN completion logic in iscsi_tmr_task_reassign() does an explict check for MRDSL across task reassignment, so go ahead and add an explict MaxXmitDataSegmentLength check here as well to be safe. Cc: Mike Christie <michaelc@cs.wisc.edu> Cc: Andy Grover <agrover@redhat.com> Cc: Hannes Reinecke <hare@suse.de> Cc: Roland Dreier <roland@purestorage.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_tmr.c')
-rw-r--r--drivers/target/iscsi/iscsi_target_tmr.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/target/iscsi/iscsi_target_tmr.c b/drivers/target/iscsi/iscsi_target_tmr.c
index f62fe123d902..05d2e6445ade 100644
--- a/drivers/target/iscsi/iscsi_target_tmr.c
+++ b/drivers/target/iscsi/iscsi_target_tmr.c
@@ -146,7 +146,7 @@ u8 iscsit_tmr_task_reassign(
}
/*
* Temporary check to prevent connection recovery for
- * connections with a differing MaxRecvDataSegmentLength.
+ * connections with a differing Max*DataSegmentLength.
*/
if (cr->maxrecvdatasegmentlength !=
conn->conn_ops->MaxRecvDataSegmentLength) {
@@ -155,6 +155,13 @@ u8 iscsit_tmr_task_reassign(
" TMR TASK_REASSIGN.\n");
return ISCSI_TMF_RSP_REJECTED;
}
+ if (cr->maxxmitdatasegmentlength !=
+ conn->conn_ops->MaxXmitDataSegmentLength) {
+ pr_err("Unable to perform connection recovery for"
+ " differing MaxXmitDataSegmentLength, rejecting"
+ " TMR TASK_REASSIGN.\n");
+ return ISCSI_TMF_RSP_REJECTED;
+ }
ref_lun = scsilun_to_int(&hdr->lun);
if (ref_lun != ref_cmd->se_cmd.orig_fe_lun) {