Whenever we send a Data-Out response to an affected LUN during
LU Reset, we should be setting the 'FINAL' bit. This will
indicate to the target that we consider this transfer finished.

Signed-off-by: Hannes Reinecke <h...@suse.de>
---
 drivers/scsi/libiscsi.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index a0d1217..16d35f0 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -321,6 +321,10 @@ static int iscsi_check_tmf_restrictions(struct iscsi_task 
*task, int opcode)
                                          task->itt, task->hdr_itt, hdr_lun);
                        return -EACCES;
                }
+               /*
+                * Set FINAL flag to terminate data transfer.
+                */
+               task->hdr->flags |= ISCSI_FLAG_CMD_FINAL;
                break;
        case ISCSI_TM_FUNC_ABORT_TASK:
                /*
-- 
1.6.0.2


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---

Reply via email to