summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2023-03-17 04:41:00 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2023-03-17 04:41:00 +0100
commitc5797fda210fc852f876f0660e959b5e9db604d8 (patch)
treee97e2e4e94345990e174dae9ab6e76611b852454 /drivers/scsi
parentMerge patch series "scsi_debug: Some minor improvements" (diff)
parentscsi: target: Add virtual remote target (diff)
downloadlinux-c5797fda210fc852f876f0660e959b5e9db604d8.tar.xz
linux-c5797fda210fc852f876f0660e959b5e9db604d8.zip
Merge patch series "add virtual remote fabric"
Dmitry Bogdanov <d.bogdanov@yadro.com> says: The patchset is based on 6.4/scsi-staging branch. The first 11 patches are just a refactoring to reduce code duplication in fabric drivers. They make several callouts be optional in fabric ops. Make a default implementation of the optional ops and remove such implementations in the fabric drivers. The last patch is a new virtual remote fabric driver. It has a valueble sence with patchset "scsi: target: make RTPI an TPG identifier" to configure RPTI on remote/tpgt_x same as on tpgt_y on other nodes in a storage cluster. That allows to report the same ports in RTPG from each node and to have a clusterwide tpg/acl/lun view in kernel. Link: https://lore.kernel.org/r/20230313181110.20566-1-d.bogdanov@yadro.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/elx/efct/efct_lio.c20
-rw-r--r--drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c30
-rw-r--r--drivers/scsi/qla2xxx/tcm_qla2xxx.c14
3 files changed, 0 insertions, 64 deletions
diff --git a/drivers/scsi/elx/efct/efct_lio.c b/drivers/scsi/elx/efct/efct_lio.c
index be4b5c1ee32d..a982b9cf9870 100644
--- a/drivers/scsi/elx/efct/efct_lio.c
+++ b/drivers/scsi/elx/efct/efct_lio.c
@@ -285,11 +285,6 @@ efct_lio_npiv_check_prod_write_protect(struct se_portal_group *se_tpg)
return tpg->tpg_attrib.prod_mode_write_protect;
}
-static u32 efct_lio_tpg_get_inst_index(struct se_portal_group *se_tpg)
-{
- return 1;
-}
-
static int efct_lio_check_stop_free(struct se_cmd *se_cmd)
{
struct efct_scsi_tgt_io *ocp =
@@ -355,15 +350,6 @@ static void efct_lio_close_session(struct se_session *se_sess)
efc_node_post_shutdown(node, NULL);
}
-static u32 efct_lio_sess_get_index(struct se_session *se_sess)
-{
- return 0;
-}
-
-static void efct_lio_set_default_node_attrs(struct se_node_acl *nacl)
-{
-}
-
static int efct_lio_get_cmd_state(struct se_cmd *cmd)
{
struct efct_scsi_tgt_io *ocp =
@@ -1607,14 +1593,11 @@ static const struct target_core_fabric_ops efct_lio_ops = {
.tpg_check_demo_mode_cache = efct_lio_check_demo_mode_cache,
.tpg_check_demo_mode_write_protect = efct_lio_check_demo_write_protect,
.tpg_check_prod_mode_write_protect = efct_lio_check_prod_write_protect,
- .tpg_get_inst_index = efct_lio_tpg_get_inst_index,
.check_stop_free = efct_lio_check_stop_free,
.aborted_task = efct_lio_aborted_task,
.release_cmd = efct_lio_release_cmd,
.close_session = efct_lio_close_session,
- .sess_get_index = efct_lio_sess_get_index,
.write_pending = efct_lio_write_pending,
- .set_default_node_attributes = efct_lio_set_default_node_attrs,
.get_cmd_state = efct_lio_get_cmd_state,
.queue_data_in = efct_lio_queue_data_in,
.queue_status = efct_lio_queue_status,
@@ -1644,14 +1627,11 @@ static const struct target_core_fabric_ops efct_lio_npiv_ops = {
efct_lio_npiv_check_demo_write_protect,
.tpg_check_prod_mode_write_protect =
efct_lio_npiv_check_prod_write_protect,
- .tpg_get_inst_index = efct_lio_tpg_get_inst_index,
.check_stop_free = efct_lio_check_stop_free,
.aborted_task = efct_lio_aborted_task,
.release_cmd = efct_lio_release_cmd,
.close_session = efct_lio_close_session,
- .sess_get_index = efct_lio_sess_get_index,
.write_pending = efct_lio_write_pending,
- .set_default_node_attributes = efct_lio_set_default_node_attrs,
.get_cmd_state = efct_lio_get_cmd_state,
.queue_data_in = efct_lio_queue_data_in,
.queue_status = efct_lio_queue_status,
diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
index e8770310a64b..385f812b8793 100644
--- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
+++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
@@ -3698,16 +3698,6 @@ static int ibmvscsis_check_true(struct se_portal_group *se_tpg)
return 1;
}
-static int ibmvscsis_check_false(struct se_portal_group *se_tpg)
-{
- return 0;
-}
-
-static u32 ibmvscsis_tpg_get_inst_index(struct se_portal_group *se_tpg)
-{
- return 1;
-}
-
static int ibmvscsis_check_stop_free(struct se_cmd *se_cmd)
{
return target_put_sess_cmd(se_cmd);
@@ -3726,11 +3716,6 @@ static void ibmvscsis_release_cmd(struct se_cmd *se_cmd)
spin_unlock_bh(&vscsi->intr_lock);
}
-static u32 ibmvscsis_sess_get_index(struct se_session *se_sess)
-{
- return 0;
-}
-
static int ibmvscsis_write_pending(struct se_cmd *se_cmd)
{
struct ibmvscsis_cmd *cmd = container_of(se_cmd, struct ibmvscsis_cmd,
@@ -3765,15 +3750,6 @@ static int ibmvscsis_write_pending(struct se_cmd *se_cmd)
return 0;
}
-static void ibmvscsis_set_default_node_attrs(struct se_node_acl *nacl)
-{
-}
-
-static int ibmvscsis_get_cmd_state(struct se_cmd *se_cmd)
-{
- return 0;
-}
-
static int ibmvscsis_queue_data_in(struct se_cmd *se_cmd)
{
struct ibmvscsis_cmd *cmd = container_of(se_cmd, struct ibmvscsis_cmd,
@@ -3982,15 +3958,9 @@ static const struct target_core_fabric_ops ibmvscsis_ops = {
.tpg_get_default_depth = ibmvscsis_get_default_depth,
.tpg_check_demo_mode = ibmvscsis_check_true,
.tpg_check_demo_mode_cache = ibmvscsis_check_true,
- .tpg_check_demo_mode_write_protect = ibmvscsis_check_false,
- .tpg_check_prod_mode_write_protect = ibmvscsis_check_false,
- .tpg_get_inst_index = ibmvscsis_tpg_get_inst_index,
.check_stop_free = ibmvscsis_check_stop_free,
.release_cmd = ibmvscsis_release_cmd,
- .sess_get_index = ibmvscsis_sess_get_index,
.write_pending = ibmvscsis_write_pending,
- .set_default_node_attributes = ibmvscsis_set_default_node_attrs,
- .get_cmd_state = ibmvscsis_get_cmd_state,
.queue_data_in = ibmvscsis_queue_data_in,
.queue_status = ibmvscsis_queue_status,
.queue_tm_rsp = ibmvscsis_queue_tm_rsp,
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
index 8024322c9c5a..3b5ba4b47b3b 100644
--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
@@ -377,11 +377,6 @@ static void tcm_qla2xxx_close_session(struct se_session *se_sess)
tcm_qla2xxx_put_sess(sess);
}
-static u32 tcm_qla2xxx_sess_get_index(struct se_session *se_sess)
-{
- return 0;
-}
-
static int tcm_qla2xxx_write_pending(struct se_cmd *se_cmd)
{
struct qla_tgt_cmd *cmd = container_of(se_cmd,
@@ -421,11 +416,6 @@ static int tcm_qla2xxx_write_pending(struct se_cmd *se_cmd)
return qlt_rdy_to_xfer(cmd);
}
-static void tcm_qla2xxx_set_default_node_attrs(struct se_node_acl *nacl)
-{
- return;
-}
-
static int tcm_qla2xxx_get_cmd_state(struct se_cmd *se_cmd)
{
if (!(se_cmd->se_cmd_flags & SCF_SCSI_TMR_CDB)) {
@@ -1811,10 +1801,8 @@ static const struct target_core_fabric_ops tcm_qla2xxx_ops = {
.check_stop_free = tcm_qla2xxx_check_stop_free,
.release_cmd = tcm_qla2xxx_release_cmd,
.close_session = tcm_qla2xxx_close_session,
- .sess_get_index = tcm_qla2xxx_sess_get_index,
.sess_get_initiator_sid = NULL,
.write_pending = tcm_qla2xxx_write_pending,
- .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,
.queue_status = tcm_qla2xxx_queue_status,
@@ -1852,10 +1840,8 @@ static const struct target_core_fabric_ops tcm_qla2xxx_npiv_ops = {
.check_stop_free = tcm_qla2xxx_check_stop_free,
.release_cmd = tcm_qla2xxx_release_cmd,
.close_session = tcm_qla2xxx_close_session,
- .sess_get_index = tcm_qla2xxx_sess_get_index,
.sess_get_initiator_sid = NULL,
.write_pending = tcm_qla2xxx_write_pending,
- .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,
.queue_status = tcm_qla2xxx_queue_status,