Skip to content

Commit f80d2f0

Browse files
bvanasschemartinkpetersen
authored andcommitted
scsi: target/core: Remove the write_pending_status() callback function
Due to the patch that makes TMF handling synchronous the write_pending_status() callback function is no longer called. Hence remove it. Acked-by: Felipe Balbi <balbi@ti.com> Reviewed-by: Sagi Grimberg <sagig@mellanox.com> Reviewed-by: Andy Grover <agrover@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Bryant G. Ly <bryantly@linux.vnet.ibm.com> Cc: Nicholas Bellinger <nab@linux-iscsi.org> Cc: Mike Christie <mchristi@redhat.com> Cc: Himanshu Madhani <himanshu.madhani@qlogic.com> Cc: Quinn Tran <quinn.tran@qlogic.com> Cc: Saurav Kashyap <saurav.kashyap@qlogic.com> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Juergen Gross <jgross@suse.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent e18e9da commit f80d2f0

16 files changed

Lines changed: 0 additions & 120 deletions

File tree

‎Documentation/target/tcm_mod_builder.py‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,6 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
297297
buf += " .sess_get_index = " + fabric_mod_name + "_sess_get_index,\n"
298298
buf += " .sess_get_initiator_sid = NULL,\n"
299299
buf += " .write_pending = " + fabric_mod_name + "_write_pending,\n"
300-
buf += " .write_pending_status = " + fabric_mod_name + "_write_pending_status,\n"
301300
buf += " .set_default_node_attributes = " + fabric_mod_name + "_set_default_node_attrs,\n"
302301
buf += " .get_cmd_state = " + fabric_mod_name + "_get_cmd_state,\n"
303302
buf += " .queue_data_in = " + fabric_mod_name + "_queue_data_in,\n"
@@ -479,13 +478,6 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
479478
buf += "}\n\n"
480479
bufi += "int " + fabric_mod_name + "_write_pending(struct se_cmd *);\n"
481480

482-
if re.search('write_pending_status\)\(', fo):
483-
buf += "int " + fabric_mod_name + "_write_pending_status(struct se_cmd *se_cmd)\n"
484-
buf += "{\n"
485-
buf += " return 0;\n"
486-
buf += "}\n\n"
487-
bufi += "int " + fabric_mod_name + "_write_pending_status(struct se_cmd *);\n"
488-
489481
if re.search('set_default_node_attributes\)\(', fo):
490482
buf += "void " + fabric_mod_name + "_set_default_node_attrs(struct se_node_acl *nacl)\n"
491483
buf += "{\n"

‎drivers/infiniband/ulp/srpt/ib_srpt.c‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2703,14 +2703,6 @@ static int srpt_rdma_cm_handler(struct rdma_cm_id *cm_id,
27032703
return ret;
27042704
}
27052705

2706-
static int srpt_write_pending_status(struct se_cmd *se_cmd)
2707-
{
2708-
struct srpt_send_ioctx *ioctx;
2709-
2710-
ioctx = container_of(se_cmd, struct srpt_send_ioctx, cmd);
2711-
return ioctx->state == SRPT_STATE_NEED_DATA;
2712-
}
2713-
27142706
/*
27152707
* srpt_write_pending - Start data transfer from initiator to target (write).
27162708
*/
@@ -3806,7 +3798,6 @@ static const struct target_core_fabric_ops srpt_template = {
38063798
.sess_get_index = srpt_sess_get_index,
38073799
.sess_get_initiator_sid = NULL,
38083800
.write_pending = srpt_write_pending,
3809-
.write_pending_status = srpt_write_pending_status,
38103801
.set_default_node_attributes = srpt_set_default_node_attrs,
38113802
.get_cmd_state = srpt_get_tcm_cmd_state,
38123803
.queue_data_in = srpt_queue_data_in,

‎drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3788,11 +3788,6 @@ static int ibmvscsis_write_pending(struct se_cmd *se_cmd)
37883788
return 0;
37893789
}
37903790

3791-
static int ibmvscsis_write_pending_status(struct se_cmd *se_cmd)
3792-
{
3793-
return 0;
3794-
}
3795-
37963791
static void ibmvscsis_set_default_node_attrs(struct se_node_acl *nacl)
37973792
{
37983793
}
@@ -4053,7 +4048,6 @@ static const struct target_core_fabric_ops ibmvscsis_ops = {
40534048
.release_cmd = ibmvscsis_release_cmd,
40544049
.sess_get_index = ibmvscsis_sess_get_index,
40554050
.write_pending = ibmvscsis_write_pending,
4056-
.write_pending_status = ibmvscsis_write_pending_status,
40574051
.set_default_node_attributes = ibmvscsis_set_default_node_attrs,
40584052
.get_cmd_state = ibmvscsis_get_cmd_state,
40594053
.queue_data_in = ibmvscsis_queue_data_in,

‎drivers/scsi/qla2xxx/tcm_qla2xxx.c‎

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -420,26 +420,6 @@ static int tcm_qla2xxx_write_pending(struct se_cmd *se_cmd)
420420
return qlt_rdy_to_xfer(cmd);
421421
}
422422

423-
static int tcm_qla2xxx_write_pending_status(struct se_cmd *se_cmd)
424-
{
425-
unsigned long flags;
426-
/*
427-
* Check for WRITE_PENDING status to determine if we need to wait for
428-
* CTIO aborts to be posted via hardware in tcm_qla2xxx_handle_data().
429-
*/
430-
spin_lock_irqsave(&se_cmd->t_state_lock, flags);
431-
if (se_cmd->t_state == TRANSPORT_WRITE_PENDING ||
432-
se_cmd->t_state == TRANSPORT_COMPLETE_QF_WP) {
433-
spin_unlock_irqrestore(&se_cmd->t_state_lock, flags);
434-
wait_for_completion_timeout(&se_cmd->t_transport_stop_comp,
435-
50);
436-
return 0;
437-
}
438-
spin_unlock_irqrestore(&se_cmd->t_state_lock, flags);
439-
440-
return 0;
441-
}
442-
443423
static void tcm_qla2xxx_set_default_node_attrs(struct se_node_acl *nacl)
444424
{
445425
return;
@@ -537,15 +517,6 @@ static void tcm_qla2xxx_handle_data_work(struct work_struct *work)
537517

538518
cmd->qpair->tgt_counters.qla_core_ret_ctio++;
539519
if (!cmd->write_data_transferred) {
540-
/*
541-
* Check if se_cmd has already been aborted via LUN_RESET, and
542-
* waiting upon completion in tcm_qla2xxx_write_pending_status()
543-
*/
544-
if (cmd->se_cmd.transport_state & CMD_T_ABORTED) {
545-
complete(&cmd->se_cmd.t_transport_stop_comp);
546-
return;
547-
}
548-
549520
switch (cmd->dif_err_code) {
550521
case DIF_ERR_GRD:
551522
cmd->se_cmd.pi_err =
@@ -1902,7 +1873,6 @@ static const struct target_core_fabric_ops tcm_qla2xxx_ops = {
19021873
.sess_get_index = tcm_qla2xxx_sess_get_index,
19031874
.sess_get_initiator_sid = NULL,
19041875
.write_pending = tcm_qla2xxx_write_pending,
1905-
.write_pending_status = tcm_qla2xxx_write_pending_status,
19061876
.set_default_node_attributes = tcm_qla2xxx_set_default_node_attrs,
19071877
.get_cmd_state = tcm_qla2xxx_get_cmd_state,
19081878
.queue_data_in = tcm_qla2xxx_queue_data_in,
@@ -1943,7 +1913,6 @@ static const struct target_core_fabric_ops tcm_qla2xxx_npiv_ops = {
19431913
.sess_get_index = tcm_qla2xxx_sess_get_index,
19441914
.sess_get_initiator_sid = NULL,
19451915
.write_pending = tcm_qla2xxx_write_pending,
1946-
.write_pending_status = tcm_qla2xxx_write_pending_status,
19471916
.set_default_node_attributes = tcm_qla2xxx_set_default_node_attrs,
19481917
.get_cmd_state = tcm_qla2xxx_get_cmd_state,
19491918
.queue_data_in = tcm_qla2xxx_queue_data_in,

‎drivers/target/iscsi/iscsi_target_configfs.c‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,18 +1389,6 @@ static int lio_write_pending(struct se_cmd *se_cmd)
13891389
return 0;
13901390
}
13911391

1392-
static int lio_write_pending_status(struct se_cmd *se_cmd)
1393-
{
1394-
struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd);
1395-
int ret;
1396-
1397-
spin_lock_bh(&cmd->istate_lock);
1398-
ret = !(cmd->cmd_flags & ICF_GOT_LAST_DATAOUT);
1399-
spin_unlock_bh(&cmd->istate_lock);
1400-
1401-
return ret;
1402-
}
1403-
14041392
static int lio_queue_status(struct se_cmd *se_cmd)
14051393
{
14061394
struct iscsi_cmd *cmd = container_of(se_cmd, struct iscsi_cmd, se_cmd);
@@ -1564,7 +1552,6 @@ const struct target_core_fabric_ops iscsi_ops = {
15641552
.sess_get_index = lio_sess_get_index,
15651553
.sess_get_initiator_sid = lio_sess_get_initiator_sid,
15661554
.write_pending = lio_write_pending,
1567-
.write_pending_status = lio_write_pending_status,
15681555
.set_default_node_attributes = lio_set_default_node_attributes,
15691556
.get_cmd_state = iscsi_get_cmd_state,
15701557
.queue_data_in = lio_queue_data_in,

‎drivers/target/loopback/tcm_loop.c‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -560,11 +560,6 @@ static int tcm_loop_write_pending(struct se_cmd *se_cmd)
560560
return 0;
561561
}
562562

563-
static int tcm_loop_write_pending_status(struct se_cmd *se_cmd)
564-
{
565-
return 0;
566-
}
567-
568563
static int tcm_loop_queue_data_in(struct se_cmd *se_cmd)
569564
{
570565
struct tcm_loop_cmd *tl_cmd = container_of(se_cmd,
@@ -1159,7 +1154,6 @@ static const struct target_core_fabric_ops loop_ops = {
11591154
.release_cmd = tcm_loop_release_cmd,
11601155
.sess_get_index = tcm_loop_sess_get_index,
11611156
.write_pending = tcm_loop_write_pending,
1162-
.write_pending_status = tcm_loop_write_pending_status,
11631157
.set_default_node_attributes = tcm_loop_set_default_node_attributes,
11641158
.get_cmd_state = tcm_loop_get_cmd_state,
11651159
.queue_data_in = tcm_loop_queue_data_in,

‎drivers/target/sbp/sbp_target.c‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1749,11 +1749,6 @@ static int sbp_write_pending(struct se_cmd *se_cmd)
17491749
return 0;
17501750
}
17511751

1752-
static int sbp_write_pending_status(struct se_cmd *se_cmd)
1753-
{
1754-
return 0;
1755-
}
1756-
17571752
static void sbp_set_default_node_attrs(struct se_node_acl *nacl)
17581753
{
17591754
return;
@@ -2329,7 +2324,6 @@ static const struct target_core_fabric_ops sbp_ops = {
23292324
.release_cmd = sbp_release_cmd,
23302325
.sess_get_index = sbp_sess_get_index,
23312326
.write_pending = sbp_write_pending,
2332-
.write_pending_status = sbp_write_pending_status,
23332327
.set_default_node_attributes = sbp_set_default_node_attrs,
23342328
.get_cmd_state = sbp_get_cmd_state,
23352329
.queue_data_in = sbp_queue_data_in,

‎drivers/target/target_core_configfs.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,10 +401,6 @@ static int target_fabric_tf_ops_check(const struct target_core_fabric_ops *tfo)
401401
pr_err("Missing tfo->write_pending()\n");
402402
return -EINVAL;
403403
}
404-
if (!tfo->write_pending_status) {
405-
pr_err("Missing tfo->write_pending_status()\n");
406-
return -EINVAL;
407-
}
408404
if (!tfo->set_default_node_attributes) {
409405
pr_err("Missing tfo->set_default_node_attributes()\n");
410406
return -EINVAL;

‎drivers/target/target_core_xcopy.c‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -442,11 +442,6 @@ static int xcopy_pt_write_pending(struct se_cmd *se_cmd)
442442
return 0;
443443
}
444444

445-
static int xcopy_pt_write_pending_status(struct se_cmd *se_cmd)
446-
{
447-
return 0;
448-
}
449-
450445
static int xcopy_pt_queue_data_in(struct se_cmd *se_cmd)
451446
{
452447
return 0;
@@ -463,7 +458,6 @@ static const struct target_core_fabric_ops xcopy_pt_tfo = {
463458
.release_cmd = xcopy_pt_release_cmd,
464459
.check_stop_free = xcopy_pt_check_stop_free,
465460
.write_pending = xcopy_pt_write_pending,
466-
.write_pending_status = xcopy_pt_write_pending_status,
467461
.queue_data_in = xcopy_pt_queue_data_in,
468462
.queue_status = xcopy_pt_queue_status,
469463
};

‎drivers/target/tcm_fc/tcm_fc.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ void ft_release_cmd(struct se_cmd *);
158158
int ft_queue_status(struct se_cmd *);
159159
int ft_queue_data_in(struct se_cmd *);
160160
int ft_write_pending(struct se_cmd *);
161-
int ft_write_pending_status(struct se_cmd *);
162161
int ft_get_cmd_state(struct se_cmd *);
163162
void ft_queue_tm_resp(struct se_cmd *);
164163
void ft_aborted_task(struct se_cmd *);

0 commit comments

Comments
 (0)