aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/target/iscsi/iscsi_transport.h21
-rw-r--r--include/target/target_core_base.h23
-rw-r--r--include/target/target_core_configfs.h1
-rw-r--r--include/target/target_core_fabric.h2
-rw-r--r--include/target/target_core_fabric_configfs.h11
-rw-r--r--include/trace/events/target.h214
6 files changed, 250 insertions, 22 deletions
diff --git a/include/target/iscsi/iscsi_transport.h b/include/target/iscsi/iscsi_transport.h
index 23a87d0cd72c..e5d09d242ba3 100644
--- a/include/target/iscsi/iscsi_transport.h
+++ b/include/target/iscsi/iscsi_transport.h
@@ -34,8 +34,6 @@ extern void iscsit_put_transport(struct iscsit_transport *);
34/* 34/*
35 * From iscsi_target.c 35 * From iscsi_target.c
36 */ 36 */
37extern int iscsit_add_reject_from_cmd(u8, int, int, unsigned char *,
38 struct iscsi_cmd *);
39extern int iscsit_setup_scsi_cmd(struct iscsi_conn *, struct iscsi_cmd *, 37extern int iscsit_setup_scsi_cmd(struct iscsi_conn *, struct iscsi_cmd *,
40 unsigned char *); 38 unsigned char *);
41extern void iscsit_set_unsoliticed_dataout(struct iscsi_cmd *); 39extern void iscsit_set_unsoliticed_dataout(struct iscsi_cmd *);
@@ -45,18 +43,26 @@ extern int iscsit_check_dataout_hdr(struct iscsi_conn *, unsigned char *,
45 struct iscsi_cmd **); 43 struct iscsi_cmd **);
46extern int iscsit_check_dataout_payload(struct iscsi_cmd *, struct iscsi_data *, 44extern int iscsit_check_dataout_payload(struct iscsi_cmd *, struct iscsi_data *,
47 bool); 45 bool);
48extern int iscsit_handle_nop_out(struct iscsi_conn *, struct iscsi_cmd *, 46extern int iscsit_setup_nop_out(struct iscsi_conn *, struct iscsi_cmd *,
49 unsigned char *); 47 struct iscsi_nopout *);
48extern int iscsit_process_nop_out(struct iscsi_conn *, struct iscsi_cmd *,
49 struct iscsi_nopout *);
50extern int iscsit_handle_logout_cmd(struct iscsi_conn *, struct iscsi_cmd *, 50extern int iscsit_handle_logout_cmd(struct iscsi_conn *, struct iscsi_cmd *,
51 unsigned char *); 51 unsigned char *);
52extern int iscsit_handle_task_mgt_cmd(struct iscsi_conn *, struct iscsi_cmd *, 52extern int iscsit_handle_task_mgt_cmd(struct iscsi_conn *, struct iscsi_cmd *,
53 unsigned char *); 53 unsigned char *);
54extern int iscsit_setup_text_cmd(struct iscsi_conn *, struct iscsi_cmd *,
55 struct iscsi_text *);
56extern int iscsit_process_text_cmd(struct iscsi_conn *, struct iscsi_cmd *,
57 struct iscsi_text *);
54extern void iscsit_build_rsp_pdu(struct iscsi_cmd *, struct iscsi_conn *, 58extern void iscsit_build_rsp_pdu(struct iscsi_cmd *, struct iscsi_conn *,
55 bool, struct iscsi_scsi_rsp *); 59 bool, struct iscsi_scsi_rsp *);
56extern void iscsit_build_nopin_rsp(struct iscsi_cmd *, struct iscsi_conn *, 60extern void iscsit_build_nopin_rsp(struct iscsi_cmd *, struct iscsi_conn *,
57 struct iscsi_nopin *, bool); 61 struct iscsi_nopin *, bool);
58extern void iscsit_build_task_mgt_rsp(struct iscsi_cmd *, struct iscsi_conn *, 62extern void iscsit_build_task_mgt_rsp(struct iscsi_cmd *, struct iscsi_conn *,
59 struct iscsi_tm_rsp *); 63 struct iscsi_tm_rsp *);
64extern int iscsit_build_text_rsp(struct iscsi_cmd *, struct iscsi_conn *,
65 struct iscsi_text_rsp *);
60extern void iscsit_build_reject(struct iscsi_cmd *, struct iscsi_conn *, 66extern void iscsit_build_reject(struct iscsi_cmd *, struct iscsi_conn *,
61 struct iscsi_reject *); 67 struct iscsi_reject *);
62extern int iscsit_build_logout_rsp(struct iscsi_cmd *, struct iscsi_conn *, 68extern int iscsit_build_logout_rsp(struct iscsi_cmd *, struct iscsi_conn *,
@@ -67,6 +73,10 @@ extern int iscsit_logout_post_handler(struct iscsi_cmd *, struct iscsi_conn *);
67 */ 73 */
68extern void iscsit_increment_maxcmdsn(struct iscsi_cmd *, struct iscsi_session *); 74extern void iscsit_increment_maxcmdsn(struct iscsi_cmd *, struct iscsi_session *);
69/* 75/*
76 * From iscsi_target_erl0.c
77 */
78extern void iscsit_cause_connection_reinstatement(struct iscsi_conn *, int);
79/*
70 * From iscsi_target_erl1.c 80 * From iscsi_target_erl1.c
71 */ 81 */
72extern void iscsit_stop_dataout_timer(struct iscsi_cmd *); 82extern void iscsit_stop_dataout_timer(struct iscsi_cmd *);
@@ -80,4 +90,5 @@ extern int iscsit_tmr_post_handler(struct iscsi_cmd *, struct iscsi_conn *);
80 * From iscsi_target_util.c 90 * From iscsi_target_util.c
81 */ 91 */
82extern struct iscsi_cmd *iscsit_allocate_cmd(struct iscsi_conn *, gfp_t); 92extern struct iscsi_cmd *iscsit_allocate_cmd(struct iscsi_conn *, gfp_t);
83extern int iscsit_sequence_cmd(struct iscsi_conn *, struct iscsi_cmd *, __be32); 93extern int iscsit_sequence_cmd(struct iscsi_conn *, struct iscsi_cmd *,
94 unsigned char *, __be32);
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index 4ea4f985f394..e34fc904f2e1 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -218,14 +218,11 @@ enum tcm_tmreq_table {
218 218
219/* fabric independent task management response values */ 219/* fabric independent task management response values */
220enum tcm_tmrsp_table { 220enum tcm_tmrsp_table {
221 TMR_FUNCTION_COMPLETE = 0, 221 TMR_FUNCTION_COMPLETE = 1,
222 TMR_TASK_DOES_NOT_EXIST = 1, 222 TMR_TASK_DOES_NOT_EXIST = 2,
223 TMR_LUN_DOES_NOT_EXIST = 2, 223 TMR_LUN_DOES_NOT_EXIST = 3,
224 TMR_TASK_STILL_ALLEGIANT = 3, 224 TMR_TASK_MGMT_FUNCTION_NOT_SUPPORTED = 4,
225 TMR_TASK_FAILOVER_NOT_SUPPORTED = 4, 225 TMR_FUNCTION_REJECTED = 5,
226 TMR_TASK_MGMT_FUNCTION_NOT_SUPPORTED = 5,
227 TMR_FUNCTION_AUTHORIZATION_FAILED = 6,
228 TMR_FUNCTION_REJECTED = 255,
229}; 226};
230 227
231/* 228/*
@@ -339,8 +336,6 @@ struct t10_pr_registration {
339 /* Used during APTPL metadata reading */ 336 /* Used during APTPL metadata reading */
340#define PR_APTPL_MAX_TPORT_LEN 256 337#define PR_APTPL_MAX_TPORT_LEN 256
341 unsigned char pr_tport[PR_APTPL_MAX_TPORT_LEN]; 338 unsigned char pr_tport[PR_APTPL_MAX_TPORT_LEN];
342 /* For writing out live meta data */
343 unsigned char *pr_aptpl_buf;
344 u16 pr_aptpl_rpti; 339 u16 pr_aptpl_rpti;
345 u16 pr_reg_tpgt; 340 u16 pr_reg_tpgt;
346 /* Reservation effects all target ports */ 341 /* Reservation effects all target ports */
@@ -374,9 +369,7 @@ struct t10_reservation {
374 /* Activate Persistence across Target Power Loss enabled 369 /* Activate Persistence across Target Power Loss enabled
375 * for SCSI device */ 370 * for SCSI device */
376 int pr_aptpl_active; 371 int pr_aptpl_active;
377 /* Used by struct t10_reservation->pr_aptpl_buf_len */
378#define PR_APTPL_BUF_LEN 8192 372#define PR_APTPL_BUF_LEN 8192
379 u32 pr_aptpl_buf_len;
380 u32 pr_generation; 373 u32 pr_generation;
381 spinlock_t registration_lock; 374 spinlock_t registration_lock;
382 spinlock_t aptpl_reg_lock; 375 spinlock_t aptpl_reg_lock;
@@ -424,8 +417,6 @@ struct se_cmd {
424 int sam_task_attr; 417 int sam_task_attr;
425 /* Transport protocol dependent state, see transport_state_table */ 418 /* Transport protocol dependent state, see transport_state_table */
426 enum transport_state_table t_state; 419 enum transport_state_table t_state;
427 /* Used to signal cmd->se_tfo->check_release_cmd() usage per cmd */
428 unsigned check_release:1;
429 unsigned cmd_wait_set:1; 420 unsigned cmd_wait_set:1;
430 unsigned unknown_data_length:1; 421 unsigned unknown_data_length:1;
431 /* See se_cmd_flags_table */ 422 /* See se_cmd_flags_table */
@@ -458,7 +449,6 @@ struct se_cmd {
458 unsigned char *t_task_cdb; 449 unsigned char *t_task_cdb;
459 unsigned char __t_task_cdb[TCM_MAX_COMMAND_SIZE]; 450 unsigned char __t_task_cdb[TCM_MAX_COMMAND_SIZE];
460 unsigned long long t_task_lba; 451 unsigned long long t_task_lba;
461 atomic_t t_fe_count;
462 unsigned int transport_state; 452 unsigned int transport_state;
463#define CMD_T_ABORTED (1 << 0) 453#define CMD_T_ABORTED (1 << 0)
464#define CMD_T_ACTIVE (1 << 1) 454#define CMD_T_ACTIVE (1 << 1)
@@ -802,11 +792,12 @@ struct se_portal_group {
802 struct target_core_fabric_ops *se_tpg_tfo; 792 struct target_core_fabric_ops *se_tpg_tfo;
803 struct se_wwn *se_tpg_wwn; 793 struct se_wwn *se_tpg_wwn;
804 struct config_group tpg_group; 794 struct config_group tpg_group;
805 struct config_group *tpg_default_groups[6]; 795 struct config_group *tpg_default_groups[7];
806 struct config_group tpg_lun_group; 796 struct config_group tpg_lun_group;
807 struct config_group tpg_np_group; 797 struct config_group tpg_np_group;
808 struct config_group tpg_acl_group; 798 struct config_group tpg_acl_group;
809 struct config_group tpg_attrib_group; 799 struct config_group tpg_attrib_group;
800 struct config_group tpg_auth_group;
810 struct config_group tpg_param_group; 801 struct config_group tpg_param_group;
811}; 802};
812 803
diff --git a/include/target/target_core_configfs.h b/include/target/target_core_configfs.h
index 612509592ffd..713c5004f4ae 100644
--- a/include/target/target_core_configfs.h
+++ b/include/target/target_core_configfs.h
@@ -23,6 +23,7 @@ struct target_fabric_configfs_template {
23 struct config_item_type tfc_tpg_np_cit; 23 struct config_item_type tfc_tpg_np_cit;
24 struct config_item_type tfc_tpg_np_base_cit; 24 struct config_item_type tfc_tpg_np_base_cit;
25 struct config_item_type tfc_tpg_attrib_cit; 25 struct config_item_type tfc_tpg_attrib_cit;
26 struct config_item_type tfc_tpg_auth_cit;
26 struct config_item_type tfc_tpg_param_cit; 27 struct config_item_type tfc_tpg_param_cit;
27 struct config_item_type tfc_tpg_nacl_cit; 28 struct config_item_type tfc_tpg_nacl_cit;
28 struct config_item_type tfc_tpg_nacl_base_cit; 29 struct config_item_type tfc_tpg_nacl_base_cit;
diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h
index 1dcce9cc99b9..7a16178424f9 100644
--- a/include/target/target_core_fabric.h
+++ b/include/target/target_core_fabric.h
@@ -61,7 +61,7 @@ struct target_core_fabric_ops {