aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/iscsi/iscsi_target_erl1.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-04-30 16:14:57 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-30 16:14:57 -0400
commit6da6dc2380c3cfe8d6b59d7c3c55fdd7a521fe6c (patch)
tree152566bea1fc5593ef58deec450e0a499776d8c4 /drivers/target/iscsi/iscsi_target_erl1.c
parent8c55f1463c1fd318d5e785f02b80bcc32176d342 (diff)
parentb8d26b3be8b33682cf163274ed07479a70554633 (diff)
Merge branch 'for-next-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull SCSI target update from Nicholas Bellinger: "The highlights this round include: - Add fileio support for WRITE_SAME w/ UNMAP=1 discard (asias) - Add fileio support for UNMAP discard (asias) - Add tcm_vhost hotplug support to work with upstream QEMU vhost-scsi-pci code (asias + mst) - Check for aborted sequence in tcm_fc response path (mdr) - Add initial iscsit_transport support into iscsi-target code (nab) - Refactor iscsi-target RX PDU logic + export request PDU handling (nab) - Refactor iscsi-target TX queue logic + export response PDU creation (nab) - Add new iSCSI Extentions for RDMA (ISER) target driver (Or + nab) The biggest changes revolve around iscsi-target refactoring in order to support the iser-target driver. This includes the conversion of the iscsi-target data-path to use modern se_cmd->cmd_kref counting, and allowing transport independent aspects of RX/TX PDU request/response handling be shared across existing traditional iscsi-target code, and the new iser-target code. Thanks to Or Gerlitz + Mellanox for supporting the iser-target development effort!" * 'for-next-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (25 commits) iser-target: Add iSCSI Extensions for RDMA (iSER) target driver tcm_vhost: Enable VIRTIO_SCSI_F_HOTPLUG tcm_vhost: Add ioctl to get and set events missed flag tcm_vhost: Add hotplug/hotunplug support tcm_vhost: Refactor the lock nesting rule tcm_fc: Check for aborted sequence iscsi-target: Add iser network portal attribute iscsi-target: Refactor TX queue logic + export response PDU creation iscsi-target: Refactor RX PDU logic + export request PDU handling iscsi-target: Add per transport iscsi_cmd alloc/free iscsi-target: Add iser-target parameter keys + setup during login iscsi-target: Initial traditional TCP conversion to iscsit_transport iscsi-target: Add iscsit_transport API template target: Add export of target_get_sess_cmd symbol target: Change default sense key of NOT_READY target/file: Set is_nonrot attribute target: Add sbc_execute_unmap() helper target/iblock: Add iblock_do_unmap() helper target/file: Add fd_do_unmap() helper target/file: Add UNMAP emulation support ...
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_erl1.c')
-rw-r--r--drivers/target/iscsi/iscsi_target_erl1.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/target/iscsi/iscsi_target_erl1.c b/drivers/target/iscsi/iscsi_target_erl1.c
index 0b52a2371305..7816af6cdd12 100644
--- a/drivers/target/iscsi/iscsi_target_erl1.c
+++ b/drivers/target/iscsi/iscsi_target_erl1.c
@@ -22,6 +22,7 @@
22#include <scsi/iscsi_proto.h> 22#include <scsi/iscsi_proto.h>
23#include <target/target_core_base.h> 23#include <target/target_core_base.h>
24#include <target/target_core_fabric.h> 24#include <target/target_core_fabric.h>
25#include <target/iscsi/iscsi_transport.h>
25 26
26#include "iscsi_target_core.h" 27#include "iscsi_target_core.h"
27#include "iscsi_target_seq_pdu_list.h" 28#include "iscsi_target_seq_pdu_list.h"
@@ -53,6 +54,9 @@ int iscsit_dump_data_payload(
53 u32 length, padding, offset = 0, size; 54 u32 length, padding, offset = 0, size;
54 struct kvec iov; 55 struct kvec iov;
55 56
57 if (conn->sess->sess_ops->RDMAExtensions)
58 return 0;
59
56 length = (buf_len > OFFLOAD_BUF_SIZE) ? OFFLOAD_BUF_SIZE : buf_len; 60 length = (buf_len > OFFLOAD_BUF_SIZE) ? OFFLOAD_BUF_SIZE : buf_len;
57 61
58 buf = kzalloc(length, GFP_ATOMIC); 62 buf = kzalloc(length, GFP_ATOMIC);
@@ -919,6 +923,7 @@ int iscsit_execute_ooo_cmdsns(struct iscsi_session *sess)
919int iscsit_execute_cmd(struct iscsi_cmd *cmd, int ooo) 923int iscsit_execute_cmd(struct iscsi_cmd *cmd, int ooo)
920{ 924{
921 struct se_cmd *se_cmd = &cmd->se_cmd; 925 struct se_cmd *se_cmd = &cmd->se_cmd;
926 struct iscsi_conn *conn = cmd->conn;
922 int lr = 0; 927 int lr = 0;
923 928
924 spin_lock_bh(&cmd->istate_lock); 929 spin_lock_bh(&cmd->istate_lock);
@@ -981,7 +986,7 @@ int iscsit_execute_cmd(struct iscsi_cmd *cmd, int ooo)
981 return 0; 986 return 0;
982 987
983 iscsit_set_dataout_sequence_values(cmd); 988 iscsit_set_dataout_sequence_values(cmd);
984 iscsit_build_r2ts_for_cmd(cmd, cmd->conn, false); 989 conn->conn_transport->iscsit_get_dataout(conn, cmd, false);
985 } 990 }
986 return 0; 991 return 0;
987 } 992 }
@@ -999,10 +1004,7 @@ int iscsit_execute_cmd(struct iscsi_cmd *cmd, int ooo)
999 if (transport_check_aborted_status(se_cmd, 1) != 0) 1004 if (transport_check_aborted_status(se_cmd, 1) != 0)
1000 return 0; 1005 return 0;
1001 1006
1002 iscsit_set_dataout_sequence_values(cmd); 1007 iscsit_set_unsoliticed_dataout(cmd);
1003 spin_lock_bh(&cmd->dataout_timeout_lock);
1004 iscsit_start_dataout_timer(cmd, cmd->conn);
1005 spin_unlock_bh(&cmd->dataout_timeout_lock);
1006 } 1008 }
1007 return transport_handle_cdb_direct(&cmd->se_cmd); 1009 return transport_handle_cdb_direct(&cmd->se_cmd);
1008 1010
@@ -1290,3 +1292,4 @@ void iscsit_stop_dataout_timer(struct iscsi_cmd *cmd)
1290 cmd->init_task_tag); 1292 cmd->init_task_tag);
1291 spin_unlock_bh(&cmd->dataout_timeout_lock); 1293 spin_unlock_bh(&cmd->dataout_timeout_lock);
1292} 1294}
1295EXPORT_SYMBOL(iscsit_stop_dataout_timer);