Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9bfa7d7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull scsi-target changes from Nicholas Bellinger:
 "There has been lots of work in existing code in a number of areas this
  past cycle.  The major highlights have been:

   * Removal of transport_do_task_sg_chain() from core + fabrics
     (Roland)
   * target-core: Removal of se_task abstraction from target-core and
     enforce hw_max_sectors for pSCSI backends (hch)
   * Re-factoring of iscsi-target tx immediate/response queues (agrover)
   * Conversion of iscsi-target back to using target core memory
     allocation logic (agrover)

  We've had one last minute iscsi-target patch go into for-next to
  address a nasty regression bug related to the target core allocation
  logic conversion from agrover that is not included in friday's
  linux-next build, but has been included in this series.

  On the new fabric module code front for-3.5, here is a brief status
  update for the three currently in flight this round:

   * usb-gadget target driver:

  Sebastian Siewior's driver for supporting usb-gadget target mode
  operation.  This will be going out as a separate PULL request from
  target-pending/usb-target-merge with subsystem maintainer ACKs.  There
  is one minor target-core patch in this series required to function.

   * sbp ieee-1394/firewire target driver:

  Chris Boot's driver for supportting the Serial Block Protocol (SBP)
  across IEEE-1394 Firewire hardware.  This will be going out as a
  separate PULL request from target-pending/sbp-target-merge with two
  additional drivers/firewire/ patches w/ subsystem maintainer ACKs.

   * qla2xxx LLD target mode infrastructure changes + tcm_qla2xxx:

  The Qlogic >= 24xx series HW target mode LLD infrastructure patch-set
  and tcm_qla2xxx fabric driver.  Support for FC target mode using
  qla2xxx LLD code has been officially submitted by Qlogic to James
  below, and is currently outstanding but not yet merged into
  scsi.git/for-next..

    [PATCH 00/22] qla2xxx: Updates for scsi "misc" branch
    http://www.spinics.net/lists/linux-scsi/msg59350.html

  Note there are *zero* direct dependencies upon this for-next series
  for the qla2xxx LLD target + tcm_qla2xxx patches submitted above, and
  over the last days the target mode team has been tracking down an
  tcm_qla2xxx specific active I/O shutdown bug that appears to now be
  almost squashed for 3.5-rc-fixes."

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (47 commits)
  iscsi-target: Fix iov_count calculation bug in iscsit_allocate_iovecs
  iscsi-target: remove dead code in iscsi_check_valuelist_for_support
  target: Handle ATA_16 passthrough for pSCSI backend devices
  target: Add MI_REPORT_TARGET_PGS ext. header + implict_trans_secs attribute
  target: Fix MAINTENANCE_IN service action CDB checks to use lower 5 bits
  target: add support for the WRITE_VERIFY command
  target: make target_put_session void
  target: cleanup transport_execute_tasks()
  target: Remove max_sectors device attribute for modern se_task less code
  target: lock => unlock typo in transport_lun_wait_for_tasks
  target: Enforce hw_max_sectors for SCF_SCSI_DATA_SG_IO_CDB
  target: remove the t_se_count field in struct se_cmd
  target: remove the t_task_cdbs_ex_left field in struct se_cmd
  target: remove the t_task_cdbs_left field in struct se_cmd
  target: remove struct se_task
  target: move the state and execute lists to the command
  target: simplify command to task linkage
  target: always allocate a single task
  target: replace ->execute_task with ->execute_cmd
  target: remove the task_sectors field in struct se_task
  ...
parents f4c16c58 f80e8ed3
Loading
Loading
Loading
Loading
+3 −7
Original line number Original line Diff line number Diff line
@@ -1099,9 +1099,8 @@ static int srpt_map_sg_to_ib_sge(struct srpt_rdma_ch *ch,
	dir = cmd->data_direction;
	dir = cmd->data_direction;
	BUG_ON(dir == DMA_NONE);
	BUG_ON(dir == DMA_NONE);


	transport_do_task_sg_chain(cmd);
	ioctx->sg = sg = sg_orig = cmd->t_data_sg;
	ioctx->sg = sg = sg_orig = cmd->t_tasks_sg_chained;
	ioctx->sg_cnt = sg_cnt = cmd->t_data_nents;
	ioctx->sg_cnt = sg_cnt = cmd->t_tasks_sg_chained_no;


	count = ib_dma_map_sg(ch->sport->sdev->device, sg, sg_cnt,
	count = ib_dma_map_sg(ch->sport->sdev->device, sg, sg_cnt,
			      opposite_dma_dir(dir));
			      opposite_dma_dir(dir));
@@ -1769,7 +1768,7 @@ static int srpt_handle_cmd(struct srpt_rdma_ch *ch,
		kref_put(&send_ioctx->kref, srpt_put_send_ioctx_kref);
		kref_put(&send_ioctx->kref, srpt_put_send_ioctx_kref);
		goto send_sense;
		goto send_sense;
	}
	}
	ret = transport_generic_allocate_tasks(cmd, srp_cmd->cdb);
	ret = target_setup_cmd_from_cdb(cmd, srp_cmd->cdb);
	if (ret < 0) {
	if (ret < 0) {
		kref_put(&send_ioctx->kref, srpt_put_send_ioctx_kref);
		kref_put(&send_ioctx->kref, srpt_put_send_ioctx_kref);
		if (cmd->se_cmd_flags & SCF_SCSI_RESERVATION_CONFLICT) {
		if (cmd->se_cmd_flags & SCF_SCSI_RESERVATION_CONFLICT) {
@@ -4004,9 +4003,6 @@ static int __init srpt_init_module(void)


	srpt_target->tf_ops = srpt_template;
	srpt_target->tf_ops = srpt_template;


	/* Enable SG chaining */
	srpt_target->tf_ops.task_sg_chaining = true;

	/*
	/*
	 * Set up default attribute lists.
	 * Set up default attribute lists.
	 */
	 */
+402 −419

File changed.

Preview size limit exceeded, changes collapsed.

+1 −2
Original line number Original line Diff line number Diff line
@@ -18,8 +18,7 @@ extern int iscsit_logout_closesession(struct iscsi_cmd *, struct iscsi_conn *);
extern int iscsit_logout_closeconnection(struct iscsi_cmd *, struct iscsi_conn *);
extern int iscsit_logout_closeconnection(struct iscsi_cmd *, struct iscsi_conn *);
extern int iscsit_logout_removeconnforrecovery(struct iscsi_cmd *, struct iscsi_conn *);
extern int iscsit_logout_removeconnforrecovery(struct iscsi_cmd *, struct iscsi_conn *);
extern int iscsit_send_async_msg(struct iscsi_conn *, u16, u8, u8);
extern int iscsit_send_async_msg(struct iscsi_conn *, u16, u8, u8);
extern int iscsit_send_r2t(struct iscsi_cmd *, struct iscsi_conn *);
extern int iscsit_build_r2ts_for_cmd(struct iscsi_cmd *, struct iscsi_conn *, bool recovery);
extern int iscsit_build_r2ts_for_cmd(struct iscsi_cmd *, struct iscsi_conn *, int);
extern void iscsit_thread_get_cpumask(struct iscsi_conn *);
extern void iscsit_thread_get_cpumask(struct iscsi_conn *);
extern int iscsi_target_tx_thread(void *);
extern int iscsi_target_tx_thread(void *);
extern int iscsi_target_rx_thread(void *);
extern int iscsi_target_rx_thread(void *);
+1 −1
Original line number Original line Diff line number Diff line
@@ -1538,7 +1538,7 @@ static int lio_write_pending(struct se_cmd *se_cmd)
	struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd);
	struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd);


	if (!cmd->immediate_data && !cmd->unsolicited_data)
	if (!cmd->immediate_data && !cmd->unsolicited_data)
		return iscsit_build_r2ts_for_cmd(cmd, cmd->conn, 1);
		return iscsit_build_r2ts_for_cmd(cmd, cmd->conn, false);


	return 0;
	return 0;
}
}
+2 −10
Original line number Original line Diff line number Diff line
@@ -296,12 +296,11 @@ struct iscsi_datain_req {
	u32			runlength;
	u32			runlength;
	u32			data_length;
	u32			data_length;
	u32			data_offset;
	u32			data_offset;
	u32			data_offset_end;
	u32			data_sn;
	u32			data_sn;
	u32			next_burst_len;
	u32			next_burst_len;
	u32			read_data_done;
	u32			read_data_done;
	u32			seq_send_order;
	u32			seq_send_order;
	struct list_head	dr_list;
	struct list_head	cmd_datain_node;
} ____cacheline_aligned;
} ____cacheline_aligned;


struct iscsi_ooo_cmdsn {
struct iscsi_ooo_cmdsn {
@@ -381,8 +380,6 @@ struct iscsi_cmd {
	u32			buf_ptr_size;
	u32			buf_ptr_size;
	/* Used to store DataDigest */
	/* Used to store DataDigest */
	u32			data_crc;
	u32			data_crc;
	/* Total size in bytes associated with command */
	u32			data_length;
	/* Counter for MaxOutstandingR2T */
	/* Counter for MaxOutstandingR2T */
	u32			outstanding_r2ts;
	u32			outstanding_r2ts;
	/* Next R2T Offset when DataSequenceInOrder=Yes */
	/* Next R2T Offset when DataSequenceInOrder=Yes */
@@ -464,16 +461,13 @@ struct iscsi_cmd {
	/* Session the command is part of,  used for connection recovery */
	/* Session the command is part of,  used for connection recovery */
	struct iscsi_session	*sess;
	struct iscsi_session	*sess;
	/* list_head for connection list */
	/* list_head for connection list */
	struct list_head	i_list;
	struct list_head	i_conn_node;
	/* The TCM I/O descriptor that is accessed via container_of() */
	/* The TCM I/O descriptor that is accessed via container_of() */
	struct se_cmd		se_cmd;
	struct se_cmd		se_cmd;
	/* Sense buffer that will be mapped into outgoing status */
	/* Sense buffer that will be mapped into outgoing status */
#define ISCSI_SENSE_BUFFER_LEN          (TRANSPORT_SENSE_BUFFER + 2)
#define ISCSI_SENSE_BUFFER_LEN          (TRANSPORT_SENSE_BUFFER + 2)
	unsigned char		sense_buffer[ISCSI_SENSE_BUFFER_LEN];
	unsigned char		sense_buffer[ISCSI_SENSE_BUFFER_LEN];


	struct scatterlist	*t_mem_sg;
	u32			t_mem_sg_nents;

	u32			padding;
	u32			padding;
	u8			pad_bytes[4];
	u8			pad_bytes[4];


@@ -500,8 +494,6 @@ struct iscsi_conn {
	u8			network_transport;
	u8			network_transport;
	enum iscsi_timer_flags_table nopin_timer_flags;
	enum iscsi_timer_flags_table nopin_timer_flags;
	enum iscsi_timer_flags_table nopin_response_timer_flags;
	enum iscsi_timer_flags_table nopin_response_timer_flags;
	u8			tx_immediate_queue;
	u8			tx_response_queue;
	/* Used to know what thread encountered a transport failure */
	/* Used to know what thread encountered a transport failure */
	u8			which_thread;
	u8			which_thread;
	/* connection id assigned by the Initiator */
	/* connection id assigned by the Initiator */
Loading