Hi,

Bart Van Assche <[email protected]> writes:
> Due to the previous patch the write_pending_status() callback
> function is no longer called. Hence remove it.
>
> Signed-off-by: Bart Van Assche <[email protected]>
> Cc: Christoph Hellwig <[email protected]>
> Cc: Hannes Reinecke <[email protected]>
> Cc: Andy Grover <[email protected]>
> Cc: Sagi Grimberg <[email protected]>
> Cc: Quinn Tran <[email protected]>
> Cc: Saurav Kashyap <[email protected]>
> Cc: Felipe Balbi <[email protected]>
> Cc: Michael S. Tsirkin <[email protected]>
> Cc: Juergen Gross <[email protected]>
> ---

Acked-by: Felipe Balbi <[email protected]>

>  Documentation/target/tcm_mod_builder.py      |  8 --------
>  drivers/infiniband/ulp/srpt/ib_srpt.c        |  9 ---------
>  drivers/scsi/qla2xxx/tcm_qla2xxx.c           | 22 ----------------------
>  drivers/target/iscsi/iscsi_target_configfs.c | 13 -------------
>  drivers/target/loopback/tcm_loop.c           |  6 ------
>  drivers/target/sbp/sbp_target.c              |  6 ------
>  drivers/target/target_core_configfs.c        |  4 ----
>  drivers/target/target_core_xcopy.c           |  6 ------
>  drivers/target/tcm_fc/tcm_fc.h               |  1 -
>  drivers/target/tcm_fc/tfc_cmd.c              |  7 -------
>  drivers/target/tcm_fc/tfc_conf.c             |  1 -
>  drivers/usb/gadget/legacy/tcm_usb_gadget.c   |  9 ---------
>  drivers/vhost/scsi.c                         |  6 ------
>  drivers/xen/xen-scsiback.c                   |  6 ------
>  include/target/target_core_fabric.h          |  1 -
>  15 files changed, 105 deletions(-)
>
> diff --git a/Documentation/target/tcm_mod_builder.py 
> b/Documentation/target/tcm_mod_builder.py
> index 7d370c9..71152bb 100755
> --- a/Documentation/target/tcm_mod_builder.py
> +++ b/Documentation/target/tcm_mod_builder.py
> @@ -299,7 +299,6 @@ def tcm_mod_build_configfs(proto_ident, 
> fabric_mod_dir_var, fabric_mod_name):
>       buf += "        .sess_get_index                 = " + fabric_mod_name + 
> "_sess_get_index,\n"
>       buf += "        .sess_get_initiator_sid         = NULL,\n"
>       buf += "        .write_pending                  = " + fabric_mod_name + 
> "_write_pending,\n"
> -     buf += "        .write_pending_status           = " + fabric_mod_name + 
> "_write_pending_status,\n"
>       buf += "        .set_default_node_attributes    = " + fabric_mod_name + 
> "_set_default_node_attrs,\n"
>       buf += "        .get_cmd_state                  = " + fabric_mod_name + 
> "_get_cmd_state,\n"
>       buf += "        .queue_data_in                  = " + fabric_mod_name + 
> "_queue_data_in,\n"
> @@ -495,13 +494,6 @@ def tcm_mod_dump_fabric_ops(proto_ident, 
> fabric_mod_dir_var, fabric_mod_name):
>                       buf += "}\n\n"
>                       bufi += "int " + fabric_mod_name + 
> "_write_pending(struct se_cmd *);\n"
>  
> -             if re.search('write_pending_status\)\(', fo):
> -                     buf += "int " + fabric_mod_name + 
> "_write_pending_status(struct se_cmd *se_cmd)\n"
> -                     buf += "{\n"
> -                     buf += "        return 0;\n"
> -                     buf += "}\n\n"
> -                     bufi += "int " + fabric_mod_name + 
> "_write_pending_status(struct se_cmd *);\n"
> -
>               if re.search('set_default_node_attributes\)\(', fo):
>                       buf += "void " + fabric_mod_name + 
> "_set_default_node_attrs(struct se_node_acl *nacl)\n"
>                       buf += "{\n"
> diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c 
> b/drivers/infiniband/ulp/srpt/ib_srpt.c
> index 4d2be30..6e8d3f6 100644
> --- a/drivers/infiniband/ulp/srpt/ib_srpt.c
> +++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
> @@ -2932,14 +2932,6 @@ out_unmap:
>       goto out;
>  }
>  
> -static int srpt_write_pending_status(struct se_cmd *se_cmd)
> -{
> -     struct srpt_send_ioctx *ioctx;
> -
> -     ioctx = container_of(se_cmd, struct srpt_send_ioctx, cmd);
> -     return srpt_get_cmd_state(ioctx) == SRPT_STATE_NEED_DATA;
> -}
> -
>  /*
>   * srpt_write_pending() - Start data transfer from initiator to target 
> (write).
>   */
> @@ -3803,7 +3795,6 @@ static const struct target_core_fabric_ops 
> srpt_template = {
>       .sess_get_index                 = srpt_sess_get_index,
>       .sess_get_initiator_sid         = NULL,
>       .write_pending                  = srpt_write_pending,
> -     .write_pending_status           = srpt_write_pending_status,
>       .set_default_node_attributes    = srpt_set_default_node_attrs,
>       .get_cmd_state                  = srpt_get_tcm_cmd_state,
>       .queue_data_in                  = srpt_queue_data_in,
> diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c 
> b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> index 3ba2e95..59bd75b 100644
> --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> @@ -391,26 +391,6 @@ static int tcm_qla2xxx_write_pending(struct se_cmd 
> *se_cmd)
>       return qlt_rdy_to_xfer(cmd);
>  }
>  
> -static int tcm_qla2xxx_write_pending_status(struct se_cmd *se_cmd)
> -{
> -     unsigned long flags;
> -     /*
> -      * Check for WRITE_PENDING status to determine if we need to wait for
> -      * CTIO aborts to be posted via hardware in tcm_qla2xxx_handle_data().
> -      */
> -     spin_lock_irqsave(&se_cmd->t_state_lock, flags);
> -     if (se_cmd->t_state == TRANSPORT_WRITE_PENDING ||
> -         se_cmd->t_state == TRANSPORT_COMPLETE_QF_WP) {
> -             spin_unlock_irqrestore(&se_cmd->t_state_lock, flags);
> -             wait_for_completion_timeout(&se_cmd->t_transport_stop_comp,
> -                                         3 * HZ);
> -             return 0;
> -     }
> -     spin_unlock_irqrestore(&se_cmd->t_state_lock, flags);
> -
> -     return 0;
> -}
> -
>  static void tcm_qla2xxx_set_default_node_attrs(struct se_node_acl *nacl)
>  {
>       return;
> @@ -1777,7 +1757,6 @@ static const struct target_core_fabric_ops 
> tcm_qla2xxx_ops = {
>       .sess_get_index                 = tcm_qla2xxx_sess_get_index,
>       .sess_get_initiator_sid         = NULL,
>       .write_pending                  = tcm_qla2xxx_write_pending,
> -     .write_pending_status           = tcm_qla2xxx_write_pending_status,
>       .set_default_node_attributes    = tcm_qla2xxx_set_default_node_attrs,
>       .get_cmd_state                  = tcm_qla2xxx_get_cmd_state,
>       .queue_data_in                  = tcm_qla2xxx_queue_data_in,
> @@ -1820,7 +1799,6 @@ static const struct target_core_fabric_ops 
> tcm_qla2xxx_npiv_ops = {
>       .sess_get_index                 = tcm_qla2xxx_sess_get_index,
>       .sess_get_initiator_sid         = NULL,
>       .write_pending                  = tcm_qla2xxx_write_pending,
> -     .write_pending_status           = tcm_qla2xxx_write_pending_status,
>       .set_default_node_attributes    = tcm_qla2xxx_set_default_node_attrs,
>       .get_cmd_state                  = tcm_qla2xxx_get_cmd_state,
>       .queue_data_in                  = tcm_qla2xxx_queue_data_in,
> diff --git a/drivers/target/iscsi/iscsi_target_configfs.c 
> b/drivers/target/iscsi/iscsi_target_configfs.c
> index 255204c..6a30f82 100644
> --- a/drivers/target/iscsi/iscsi_target_configfs.c
> +++ b/drivers/target/iscsi/iscsi_target_configfs.c
> @@ -1496,18 +1496,6 @@ static int lio_write_pending(struct se_cmd *se_cmd)
>       return 0;
>  }
>  
> -static int lio_write_pending_status(struct se_cmd *se_cmd)
> -{
> -     struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd);
> -     int ret;
> -
> -     spin_lock_bh(&cmd->istate_lock);
> -     ret = !(cmd->cmd_flags & ICF_GOT_LAST_DATAOUT);
> -     spin_unlock_bh(&cmd->istate_lock);
> -
> -     return ret;
> -}
> -
>  static int lio_queue_status(struct se_cmd *se_cmd)
>  {
>       struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd);
> @@ -1685,7 +1673,6 @@ const struct target_core_fabric_ops iscsi_ops = {
>       .sess_get_index                 = lio_sess_get_index,
>       .sess_get_initiator_sid         = lio_sess_get_initiator_sid,
>       .write_pending                  = lio_write_pending,
> -     .write_pending_status           = lio_write_pending_status,
>       .set_default_node_attributes    = lio_set_default_node_attributes,
>       .get_cmd_state                  = iscsi_get_cmd_state,
>       .queue_data_in                  = lio_queue_data_in,
> diff --git a/drivers/target/loopback/tcm_loop.c 
> b/drivers/target/loopback/tcm_loop.c
> index 999b6eb..df788f4 100644
> --- a/drivers/target/loopback/tcm_loop.c
> +++ b/drivers/target/loopback/tcm_loop.c
> @@ -627,11 +627,6 @@ static int tcm_loop_write_pending(struct se_cmd *se_cmd)
>       return 0;
>  }
>  
> -static int tcm_loop_write_pending_status(struct se_cmd *se_cmd)
> -{
> -     return 0;
> -}
> -
>  static int tcm_loop_queue_data_in(struct se_cmd *se_cmd)
>  {
>       struct tcm_loop_cmd *tl_cmd = container_of(se_cmd,
> @@ -1244,7 +1239,6 @@ static const struct target_core_fabric_ops loop_ops = {
>       .close_session                  = tcm_loop_close_session,
>       .sess_get_index                 = tcm_loop_sess_get_index,
>       .write_pending                  = tcm_loop_write_pending,
> -     .write_pending_status           = tcm_loop_write_pending_status,
>       .set_default_node_attributes    = tcm_loop_set_default_node_attributes,
>       .get_cmd_state                  = tcm_loop_get_cmd_state,
>       .queue_data_in                  = tcm_loop_queue_data_in,
> diff --git a/drivers/target/sbp/sbp_target.c b/drivers/target/sbp/sbp_target.c
> index 3072f1a..d1daee0f 100644
> --- a/drivers/target/sbp/sbp_target.c
> +++ b/drivers/target/sbp/sbp_target.c
> @@ -1754,11 +1754,6 @@ static int sbp_write_pending(struct se_cmd *se_cmd)
>       return 0;
>  }
>  
> -static int sbp_write_pending_status(struct se_cmd *se_cmd)
> -{
> -     return 0;
> -}
> -
>  static void sbp_set_default_node_attrs(struct se_node_acl *nacl)
>  {
>       return;
> @@ -2344,7 +2339,6 @@ static const struct target_core_fabric_ops sbp_ops = {
>       .close_session                  = sbp_close_session,
>       .sess_get_index                 = sbp_sess_get_index,
>       .write_pending                  = sbp_write_pending,
> -     .write_pending_status           = sbp_write_pending_status,
>       .set_default_node_attributes    = sbp_set_default_node_attrs,
>       .get_cmd_state                  = sbp_get_cmd_state,
>       .queue_data_in                  = sbp_queue_data_in,
> diff --git a/drivers/target/target_core_configfs.c 
> b/drivers/target/target_core_configfs.c
> index b9b9ffd..d03ebd3 100644
> --- a/drivers/target/target_core_configfs.c
> +++ b/drivers/target/target_core_configfs.c
> @@ -349,10 +349,6 @@ static int target_fabric_tf_ops_check(const struct 
> target_core_fabric_ops *tfo)
>               pr_err("Missing tfo->write_pending()\n");
>               return -EINVAL;
>       }
> -     if (!tfo->write_pending_status) {
> -             pr_err("Missing tfo->write_pending_status()\n");
> -             return -EINVAL;
> -     }
>       if (!tfo->set_default_node_attributes) {
>               pr_err("Missing tfo->set_default_node_attributes()\n");
>               return -EINVAL;
> diff --git a/drivers/target/target_core_xcopy.c 
> b/drivers/target/target_core_xcopy.c
> index 47fe94e..f658331 100644
> --- a/drivers/target/target_core_xcopy.c
> +++ b/drivers/target/target_core_xcopy.c
> @@ -399,11 +399,6 @@ static int xcopy_pt_write_pending(struct se_cmd *se_cmd)
>       return 0;
>  }
>  
> -static int xcopy_pt_write_pending_status(struct se_cmd *se_cmd)
> -{
> -     return 0;
> -}
> -
>  static int xcopy_pt_queue_data_in(struct se_cmd *se_cmd)
>  {
>       return 0;
> @@ -420,7 +415,6 @@ static const struct target_core_fabric_ops xcopy_pt_tfo = 
> {
>       .release_cmd            = xcopy_pt_release_cmd,
>       .check_stop_free        = xcopy_pt_check_stop_free,
>       .write_pending          = xcopy_pt_write_pending,
> -     .write_pending_status   = xcopy_pt_write_pending_status,
>       .queue_data_in          = xcopy_pt_queue_data_in,
>       .queue_status           = xcopy_pt_queue_status,
>  };
> diff --git a/drivers/target/tcm_fc/tcm_fc.h b/drivers/target/tcm_fc/tcm_fc.h
> index 39909da..25f368d 100644
> --- a/drivers/target/tcm_fc/tcm_fc.h
> +++ b/drivers/target/tcm_fc/tcm_fc.h
> @@ -156,7 +156,6 @@ void ft_release_cmd(struct se_cmd *);
>  int ft_queue_status(struct se_cmd *);
>  int ft_queue_data_in(struct se_cmd *);
>  int ft_write_pending(struct se_cmd *);
> -int ft_write_pending_status(struct se_cmd *);
>  int ft_get_cmd_state(struct se_cmd *);
>  void ft_queue_tm_resp(struct se_cmd *);
>  void ft_aborted_task(struct se_cmd *);
> diff --git a/drivers/target/tcm_fc/tfc_cmd.c b/drivers/target/tcm_fc/tfc_cmd.c
> index 064d6df..91aca99 100644
> --- a/drivers/target/tcm_fc/tfc_cmd.c
> +++ b/drivers/target/tcm_fc/tfc_cmd.c
> @@ -182,13 +182,6 @@ int ft_queue_status(struct se_cmd *se_cmd)
>       return 0;
>  }
>  
> -int ft_write_pending_status(struct se_cmd *se_cmd)
> -{
> -     struct ft_cmd *cmd = container_of(se_cmd, struct ft_cmd, se_cmd);
> -
> -     return cmd->write_data_len != se_cmd->data_length;
> -}
> -
>  /*
>   * Send TX_RDY (transfer ready).
>   */
> diff --git a/drivers/target/tcm_fc/tfc_conf.c 
> b/drivers/target/tcm_fc/tfc_conf.c
> index 85aeaa0..a879137 100644
> --- a/drivers/target/tcm_fc/tfc_conf.c
> +++ b/drivers/target/tcm_fc/tfc_conf.c
> @@ -450,7 +450,6 @@ static const struct target_core_fabric_ops ft_fabric_ops 
> = {
>       .sess_get_index =               ft_sess_get_index,
>       .sess_get_initiator_sid =       NULL,
>       .write_pending =                ft_write_pending,
> -     .write_pending_status =         ft_write_pending_status,
>       .set_default_node_attributes =  ft_set_default_node_attr,
>       .get_cmd_state =                ft_get_cmd_state,
>       .queue_data_in =                ft_queue_data_in,
> diff --git a/drivers/usb/gadget/legacy/tcm_usb_gadget.c 
> b/drivers/usb/gadget/legacy/tcm_usb_gadget.c
> index ddef0c5..ef4195a 100644
> --- a/drivers/usb/gadget/legacy/tcm_usb_gadget.c
> +++ b/drivers/usb/gadget/legacy/tcm_usb_gadget.c
> @@ -1310,14 +1310,6 @@ static u32 usbg_sess_get_index(struct se_session 
> *se_sess)
>       return 0;
>  }
>  
> -/*
> - * XXX Error recovery: return != 0 if we expect writes. Dunno when that 
> could be
> - */
> -static int usbg_write_pending_status(struct se_cmd *se_cmd)
> -{
> -     return 0;
> -}
> -
>  static void usbg_set_default_node_attrs(struct se_node_acl *nacl)
>  {
>       return;
> @@ -1703,7 +1695,6 @@ static const struct target_core_fabric_ops usbg_ops = {
>       .sess_get_index                 = usbg_sess_get_index,
>       .sess_get_initiator_sid         = NULL,
>       .write_pending                  = usbg_send_write_request,
> -     .write_pending_status           = usbg_write_pending_status,
>       .set_default_node_attributes    = usbg_set_default_node_attrs,
>       .get_cmd_state                  = usbg_get_cmd_state,
>       .queue_data_in                  = usbg_send_read_response,
> diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
> index a971765..818c288 100644
> --- a/drivers/vhost/scsi.c
> +++ b/drivers/vhost/scsi.c
> @@ -357,11 +357,6 @@ static int vhost_scsi_write_pending(struct se_cmd 
> *se_cmd)
>       return 0;
>  }
>  
> -static int vhost_scsi_write_pending_status(struct se_cmd *se_cmd)
> -{
> -     return 0;
> -}
> -
>  static void vhost_scsi_set_default_node_attrs(struct se_node_acl *nacl)
>  {
>       return;
> @@ -2138,7 +2133,6 @@ static struct target_core_fabric_ops vhost_scsi_ops = {
>       .sess_get_index                 = vhost_scsi_sess_get_index,
>       .sess_get_initiator_sid         = NULL,
>       .write_pending                  = vhost_scsi_write_pending,
> -     .write_pending_status           = vhost_scsi_write_pending_status,
>       .set_default_node_attributes    = vhost_scsi_set_default_node_attrs,
>       .get_cmd_state                  = vhost_scsi_get_cmd_state,
>       .queue_data_in                  = vhost_scsi_queue_data_in,
> diff --git a/drivers/xen/xen-scsiback.c b/drivers/xen/xen-scsiback.c
> index 43bcae8..28f623f 100644
> --- a/drivers/xen/xen-scsiback.c
> +++ b/drivers/xen/xen-scsiback.c
> @@ -1383,11 +1383,6 @@ static int scsiback_write_pending(struct se_cmd 
> *se_cmd)
>       return 0;
>  }
>  
> -static int scsiback_write_pending_status(struct se_cmd *se_cmd)
> -{
> -     return 0;
> -}
> -
>  static void scsiback_set_default_node_attrs(struct se_node_acl *nacl)
>  {
>  }
> @@ -1820,7 +1815,6 @@ static const struct target_core_fabric_ops scsiback_ops 
> = {
>       .sess_get_index                 = scsiback_sess_get_index,
>       .sess_get_initiator_sid         = NULL,
>       .write_pending                  = scsiback_write_pending,
> -     .write_pending_status           = scsiback_write_pending_status,
>       .set_default_node_attributes    = scsiback_set_default_node_attrs,
>       .get_cmd_state                  = scsiback_get_cmd_state,
>       .queue_data_in                  = scsiback_queue_data_in,
> diff --git a/include/target/target_core_fabric.h 
> b/include/target/target_core_fabric.h
> index 98a362d..fbe45d55 100644
> --- a/include/target/target_core_fabric.h
> +++ b/include/target/target_core_fabric.h
> @@ -63,7 +63,6 @@ struct target_core_fabric_ops {
>       u32 (*sess_get_initiator_sid)(struct se_session *,
>                                     unsigned char *, u32);
>       int (*write_pending)(struct se_cmd *);
> -     int (*write_pending_status)(struct se_cmd *);
>       void (*set_default_node_attributes)(struct se_node_acl *);
>       int (*get_cmd_state)(struct se_cmd *);
>       int (*queue_data_in)(struct se_cmd *);
> -- 
> 2.1.4
>

-- 
balbi

Attachment: signature.asc
Description: PGP signature

Reply via email to