.. | .. |
---|
8 | 8 | |
---|
9 | 9 | struct target_core_fabric_ops { |
---|
10 | 10 | struct module *module; |
---|
11 | | - const char *name; |
---|
| 11 | + /* |
---|
| 12 | + * XXX: Special case for iscsi/iSCSI... |
---|
| 13 | + * If non-null, fabric_alias is used for matching target/$fabric |
---|
| 14 | + * ConfigFS paths. If null, fabric_name is used for this (see below). |
---|
| 15 | + */ |
---|
| 16 | + const char *fabric_alias; |
---|
| 17 | + /* |
---|
| 18 | + * fabric_name is used for matching target/$fabric ConfigFS paths |
---|
| 19 | + * without a fabric_alias (see above). It's also used for the ALUA state |
---|
| 20 | + * path and is stored on disk with PR state. |
---|
| 21 | + */ |
---|
| 22 | + const char *fabric_name; |
---|
12 | 23 | size_t node_acl_size; |
---|
13 | 24 | /* |
---|
14 | 25 | * Limits number of scatterlist entries per SCF_SCSI_DATA_CDB payload. |
---|
.. | .. |
---|
23 | 34 | * XXX: Currently assumes single PAGE_SIZE per scatterlist entry |
---|
24 | 35 | */ |
---|
25 | 36 | u32 max_data_sg_nents; |
---|
26 | | - char *(*get_fabric_name)(void); |
---|
27 | 37 | char *(*tpg_get_wwn)(struct se_portal_group *); |
---|
28 | 38 | u16 (*tpg_get_tag)(struct se_portal_group *); |
---|
29 | 39 | u32 (*tpg_get_default_depth)(struct se_portal_group *); |
---|
.. | .. |
---|
64 | 74 | u32 (*sess_get_initiator_sid)(struct se_session *, |
---|
65 | 75 | unsigned char *, u32); |
---|
66 | 76 | int (*write_pending)(struct se_cmd *); |
---|
67 | | - int (*write_pending_status)(struct se_cmd *); |
---|
68 | 77 | void (*set_default_node_attributes)(struct se_node_acl *); |
---|
69 | 78 | int (*get_cmd_state)(struct se_cmd *); |
---|
70 | 79 | int (*queue_data_in)(struct se_cmd *); |
---|
.. | .. |
---|
101 | 110 | struct configfs_attribute **tfc_tpg_nacl_attrib_attrs; |
---|
102 | 111 | struct configfs_attribute **tfc_tpg_nacl_auth_attrs; |
---|
103 | 112 | struct configfs_attribute **tfc_tpg_nacl_param_attrs; |
---|
| 113 | + |
---|
| 114 | + /* |
---|
| 115 | + * Set this member variable to true if the SCSI transport protocol |
---|
| 116 | + * (e.g. iSCSI) requires that the Data-Out buffer is transferred in |
---|
| 117 | + * its entirety before a command is aborted. |
---|
| 118 | + */ |
---|
| 119 | + bool write_pending_must_be_called; |
---|
104 | 120 | }; |
---|
105 | 121 | |
---|
106 | 122 | int target_register_template(const struct target_core_fabric_ops *fo); |
---|
.. | .. |
---|
126 | 142 | struct se_node_acl *, struct se_session *, void *); |
---|
127 | 143 | ssize_t target_show_dynamic_sessions(struct se_portal_group *, char *); |
---|
128 | 144 | void transport_free_session(struct se_session *); |
---|
| 145 | +void target_spc2_release(struct se_node_acl *nacl); |
---|
129 | 146 | void target_put_nacl(struct se_node_acl *); |
---|
130 | 147 | void transport_deregister_session_configfs(struct se_session *); |
---|
131 | 148 | void transport_deregister_session(struct se_session *); |
---|
.. | .. |
---|
133 | 150 | |
---|
134 | 151 | void transport_init_se_cmd(struct se_cmd *, |
---|
135 | 152 | const struct target_core_fabric_ops *, |
---|
136 | | - struct se_session *, u32, int, int, unsigned char *); |
---|
137 | | -sense_reason_t transport_lookup_cmd_lun(struct se_cmd *, u64); |
---|
138 | | -sense_reason_t target_setup_cmd_from_cdb(struct se_cmd *, unsigned char *); |
---|
| 153 | + struct se_session *, u32, int, int, unsigned char *, u64); |
---|
| 154 | +sense_reason_t transport_lookup_cmd_lun(struct se_cmd *); |
---|
| 155 | +sense_reason_t target_cmd_init_cdb(struct se_cmd *, unsigned char *); |
---|
| 156 | +sense_reason_t target_cmd_parse_cdb(struct se_cmd *); |
---|
139 | 157 | int target_submit_cmd_map_sgls(struct se_cmd *, struct se_session *, |
---|
140 | 158 | unsigned char *, unsigned char *, u64, u32, int, int, int, |
---|
141 | 159 | struct scatterlist *, u32, struct scatterlist *, u32, |
---|
.. | .. |
---|
149 | 167 | int transport_handle_cdb_direct(struct se_cmd *); |
---|
150 | 168 | sense_reason_t transport_generic_new_cmd(struct se_cmd *); |
---|
151 | 169 | |
---|
| 170 | +void target_put_cmd_and_wait(struct se_cmd *cmd); |
---|
152 | 171 | void target_execute_cmd(struct se_cmd *cmd); |
---|
153 | 172 | |
---|
154 | 173 | int transport_generic_free_cmd(struct se_cmd *, int); |
---|
155 | 174 | |
---|
156 | 175 | bool transport_wait_for_tasks(struct se_cmd *); |
---|
157 | | -int transport_check_aborted_status(struct se_cmd *, int); |
---|
158 | 176 | int transport_send_check_condition_and_sense(struct se_cmd *, |
---|
159 | 177 | sense_reason_t, int); |
---|
| 178 | +int target_send_busy(struct se_cmd *cmd); |
---|
160 | 179 | int target_get_sess_cmd(struct se_cmd *, bool); |
---|
161 | 180 | int target_put_sess_cmd(struct se_cmd *); |
---|
162 | 181 | void target_sess_cmd_list_set_waiting(struct se_session *); |
---|
.. | .. |
---|
169 | 188 | void core_tmr_release_req(struct se_tmr_req *); |
---|
170 | 189 | int transport_generic_handle_tmr(struct se_cmd *); |
---|
171 | 190 | void transport_generic_request_failure(struct se_cmd *, sense_reason_t); |
---|
172 | | -int transport_lookup_tmr_lun(struct se_cmd *, u64); |
---|
| 191 | +int transport_lookup_tmr_lun(struct se_cmd *); |
---|
173 | 192 | void core_allocate_nexus_loss_ua(struct se_node_acl *acl); |
---|
174 | 193 | |
---|
175 | 194 | struct se_node_acl *core_tpg_get_initiator_node_acl(struct se_portal_group *tpg, |
---|