target: Add per device xcopy_lun for copy offload I/O
This patch adds a se_device->xcopy_lun that is used for local copy offload I/O, instead of allocating + initializing a pseudo se_lun for each received EXTENDED_COPY operation. Also, move declaration of struct se_lun + struct se_port_stat_grps ahead of struct se_device. Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
@@ -627,6 +627,34 @@ struct se_dev_attrib {
|
||||
struct config_group da_group;
|
||||
};
|
||||
|
||||
struct se_port_stat_grps {
|
||||
struct config_group stat_group;
|
||||
struct config_group scsi_port_group;
|
||||
struct config_group scsi_tgt_port_group;
|
||||
struct config_group scsi_transport_group;
|
||||
};
|
||||
|
||||
struct se_lun {
|
||||
#define SE_LUN_LINK_MAGIC 0xffff7771
|
||||
u32 lun_link_magic;
|
||||
/* See transport_lun_status_table */
|
||||
enum transport_lun_status_table lun_status;
|
||||
u32 lun_access;
|
||||
u32 lun_flags;
|
||||
u32 unpacked_lun;
|
||||
atomic_t lun_acl_count;
|
||||
spinlock_t lun_acl_lock;
|
||||
spinlock_t lun_sep_lock;
|
||||
struct completion lun_shutdown_comp;
|
||||
struct list_head lun_acl_list;
|
||||
struct se_device *lun_se_dev;
|
||||
struct se_port *lun_sep;
|
||||
struct config_group lun_group;
|
||||
struct se_port_stat_grps port_stat_grps;
|
||||
struct completion lun_ref_comp;
|
||||
struct percpu_ref lun_ref;
|
||||
};
|
||||
|
||||
struct se_dev_stat_grps {
|
||||
struct config_group stat_group;
|
||||
struct config_group scsi_dev_group;
|
||||
@@ -710,6 +738,7 @@ struct se_device {
|
||||
struct se_subsystem_api *transport;
|
||||
/* Linked list for struct se_hba struct se_device list */
|
||||
struct list_head dev_list;
|
||||
struct se_lun xcopy_lun;
|
||||
};
|
||||
|
||||
struct se_hba {
|
||||
@@ -729,34 +758,6 @@ struct se_hba {
|
||||
struct se_subsystem_api *transport;
|
||||
};
|
||||
|
||||
struct se_port_stat_grps {
|
||||
struct config_group stat_group;
|
||||
struct config_group scsi_port_group;
|
||||
struct config_group scsi_tgt_port_group;
|
||||
struct config_group scsi_transport_group;
|
||||
};
|
||||
|
||||
struct se_lun {
|
||||
#define SE_LUN_LINK_MAGIC 0xffff7771
|
||||
u32 lun_link_magic;
|
||||
/* See transport_lun_status_table */
|
||||
enum transport_lun_status_table lun_status;
|
||||
u32 lun_access;
|
||||
u32 lun_flags;
|
||||
u32 unpacked_lun;
|
||||
atomic_t lun_acl_count;
|
||||
spinlock_t lun_acl_lock;
|
||||
spinlock_t lun_sep_lock;
|
||||
struct completion lun_shutdown_comp;
|
||||
struct list_head lun_acl_list;
|
||||
struct se_device *lun_se_dev;
|
||||
struct se_port *lun_sep;
|
||||
struct config_group lun_group;
|
||||
struct se_port_stat_grps port_stat_grps;
|
||||
struct completion lun_ref_comp;
|
||||
struct percpu_ref lun_ref;
|
||||
};
|
||||
|
||||
struct scsi_port_stats {
|
||||
u64 cmd_pdus;
|
||||
u64 tx_data_octets;
|
||||
|
Reference in New Issue
Block a user