mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-19 11:41:26 +00:00
qla2x00t-32gbit: Move sess cmd list/lock to driver
Except for debug output in the shutdown path, tcm_qla2xxx is the only driver using the se_session sess_cmd_list. Move the list to that driver to facilitate removing the sess_cmd_lock from the main I/O path for the rest of the drivers. Link: https://lore.kernel.org/r/1604257174-4524-6-git-send-email-michael.christie@oracle.com Cc: Nilesh Javali <njavali@marvell.com> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Mike Christie <michael.christie@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> See also upstream commit 605e74025f953b995a3a241ead43bde71c1c99b5. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9287 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2519,6 +2519,8 @@ typedef struct fc_port {
|
||||
int generation;
|
||||
|
||||
struct se_session *se_sess;
|
||||
struct list_head sess_cmd_list;
|
||||
spinlock_t sess_cmd_lock;
|
||||
struct kref sess_kref;
|
||||
struct qla_tgt *tgt;
|
||||
unsigned long expires;
|
||||
|
||||
@@ -4974,6 +4974,9 @@ qla2x00_alloc_fcport(scsi_qla_host_t *vha, gfp_t flags)
|
||||
INIT_LIST_HEAD(&fcport->gnl_entry);
|
||||
INIT_LIST_HEAD(&fcport->list);
|
||||
|
||||
INIT_LIST_HEAD(&fcport->sess_cmd_list);
|
||||
spin_lock_init(&fcport->sess_cmd_lock);
|
||||
|
||||
return fcport;
|
||||
}
|
||||
|
||||
|
||||
@@ -4342,6 +4342,7 @@ static struct qla_tgt_cmd *qlt_get_tag(scsi_qla_host_t *vha,
|
||||
|
||||
cmd->cmd_type = TYPE_TGT_CMD;
|
||||
memcpy(&cmd->atio, atio, sizeof(*atio));
|
||||
INIT_LIST_HEAD(&cmd->sess_cmd_list);
|
||||
cmd->state = QLA_TGT_STATE_NEW;
|
||||
cmd->tgt = vha->vha_tgt.qla_tgt;
|
||||
qlt_incr_num_pend_cmds(vha);
|
||||
|
||||
@@ -891,6 +891,7 @@ struct qla_tgt_cmd {
|
||||
uint8_t cmd_type;
|
||||
uint8_t pad[7];
|
||||
struct se_cmd se_cmd;
|
||||
struct list_head sess_cmd_list;
|
||||
struct scst_cmd *scst_cmd;
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0)
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user