diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2013-05-01 09:16:50 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2013-05-01 09:16:50 +0300 |
commit | bc7562355fda8075793bf66094cda573206ec693 (patch) | |
tree | 164ead72687e6f73daad2870741afcce07ca7e70 /include | |
parent | c39904a0ac22cf05f5f44226457f6da0fe65457e (diff) | |
parent | b8d26b3be8b33682cf163274ed07479a70554633 (diff) | |
download | kernel_goldelico_gta04-bc7562355fda8075793bf66094cda573206ec693.zip kernel_goldelico_gta04-bc7562355fda8075793bf66094cda573206ec693.tar.gz kernel_goldelico_gta04-bc7562355fda8075793bf66094cda573206ec693.tar.bz2 |
Merge branch 'for-next-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending into vhost-net-next
Diffstat (limited to 'include')
-rw-r--r-- | include/target/iscsi/iscsi_transport.h | 83 | ||||
-rw-r--r-- | include/target/target_core_backend.h | 4 | ||||
-rw-r--r-- | include/target/target_core_fabric.h | 2 |
3 files changed, 88 insertions, 1 deletions
diff --git a/include/target/iscsi/iscsi_transport.h b/include/target/iscsi/iscsi_transport.h new file mode 100644 index 0000000..23a87d0 --- /dev/null +++ b/include/target/iscsi/iscsi_transport.h @@ -0,0 +1,83 @@ +#include <linux/module.h> +#include <linux/list.h> +#include "../../../drivers/target/iscsi/iscsi_target_core.h" + +struct iscsit_transport { +#define ISCSIT_TRANSPORT_NAME 16 + char name[ISCSIT_TRANSPORT_NAME]; + int transport_type; + struct module *owner; + struct list_head t_node; + int (*iscsit_setup_np)(struct iscsi_np *, struct __kernel_sockaddr_storage *); + int (*iscsit_accept_np)(struct iscsi_np *, struct iscsi_conn *); + void (*iscsit_free_np)(struct iscsi_np *); + void (*iscsit_free_conn)(struct iscsi_conn *); + struct iscsi_cmd *(*iscsit_alloc_cmd)(struct iscsi_conn *, gfp_t); + int (*iscsit_get_login_rx)(struct iscsi_conn *, struct iscsi_login *); + int (*iscsit_put_login_tx)(struct iscsi_conn *, struct iscsi_login *, u32); + int (*iscsit_immediate_queue)(struct iscsi_conn *, struct iscsi_cmd *, int); + int (*iscsit_response_queue)(struct iscsi_conn *, struct iscsi_cmd *, int); + int (*iscsit_get_dataout)(struct iscsi_conn *, struct iscsi_cmd *, bool); + int (*iscsit_queue_data_in)(struct iscsi_conn *, struct iscsi_cmd *); + int (*iscsit_queue_status)(struct iscsi_conn *, struct iscsi_cmd *); +}; + +/* + * From iscsi_target_transport.c + */ + +extern int iscsit_register_transport(struct iscsit_transport *); +extern void iscsit_unregister_transport(struct iscsit_transport *); +extern struct iscsit_transport *iscsit_get_transport(int); +extern void iscsit_put_transport(struct iscsit_transport *); + +/* + * From iscsi_target.c + */ +extern int iscsit_add_reject_from_cmd(u8, int, int, unsigned char *, + struct iscsi_cmd *); +extern int iscsit_setup_scsi_cmd(struct iscsi_conn *, struct iscsi_cmd *, + unsigned char *); +extern void iscsit_set_unsoliticed_dataout(struct iscsi_cmd *); +extern int iscsit_process_scsi_cmd(struct iscsi_conn *, struct iscsi_cmd *, + struct iscsi_scsi_req *); +extern int iscsit_check_dataout_hdr(struct iscsi_conn *, unsigned char *, + struct iscsi_cmd **); +extern int iscsit_check_dataout_payload(struct iscsi_cmd *, struct iscsi_data *, + bool); +extern int iscsit_handle_nop_out(struct iscsi_conn *, struct iscsi_cmd *, + unsigned char *); +extern int iscsit_handle_logout_cmd(struct iscsi_conn *, struct iscsi_cmd *, + unsigned char *); +extern int iscsit_handle_task_mgt_cmd(struct iscsi_conn *, struct iscsi_cmd *, + unsigned char *); +extern void iscsit_build_rsp_pdu(struct iscsi_cmd *, struct iscsi_conn *, + bool, struct iscsi_scsi_rsp *); +extern void iscsit_build_nopin_rsp(struct iscsi_cmd *, struct iscsi_conn *, + struct iscsi_nopin *, bool); +extern void iscsit_build_task_mgt_rsp(struct iscsi_cmd *, struct iscsi_conn *, + struct iscsi_tm_rsp *); +extern void iscsit_build_reject(struct iscsi_cmd *, struct iscsi_conn *, + struct iscsi_reject *); +extern int iscsit_build_logout_rsp(struct iscsi_cmd *, struct iscsi_conn *, + struct iscsi_logout_rsp *); +extern int iscsit_logout_post_handler(struct iscsi_cmd *, struct iscsi_conn *); +/* + * From iscsi_target_device.c + */ +extern void iscsit_increment_maxcmdsn(struct iscsi_cmd *, struct iscsi_session *); +/* + * From iscsi_target_erl1.c + */ +extern void iscsit_stop_dataout_timer(struct iscsi_cmd *); + +/* + * From iscsi_target_tmr.c + */ +extern int iscsit_tmr_post_handler(struct iscsi_cmd *, struct iscsi_conn *); + +/* + * From iscsi_target_util.c + */ +extern struct iscsi_cmd *iscsit_allocate_cmd(struct iscsi_conn *, gfp_t); +extern int iscsit_sequence_cmd(struct iscsi_conn *, struct iscsi_cmd *, __be32); diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h index b128c20..ffa2696 100644 --- a/include/target/target_core_backend.h +++ b/include/target/target_core_backend.h @@ -60,6 +60,10 @@ sense_reason_t sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops); u32 sbc_get_device_rev(struct se_device *dev); u32 sbc_get_device_type(struct se_device *dev); sector_t sbc_get_write_same_sectors(struct se_cmd *cmd); +sense_reason_t sbc_execute_unmap(struct se_cmd *cmd, + sense_reason_t (*do_unmap_fn)(struct se_cmd *cmd, void *priv, + sector_t lba, sector_t nolb), + void *priv); void transport_set_vpd_proto_id(struct t10_vpd *, unsigned char *); int transport_set_vpd_assoc(struct t10_vpd *, unsigned char *); diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h index aaa1ee6..ba3471b 100644 --- a/include/target/target_core_fabric.h +++ b/include/target/target_core_fabric.h @@ -120,7 +120,7 @@ bool transport_wait_for_tasks(struct se_cmd *); int transport_check_aborted_status(struct se_cmd *, int); int transport_send_check_condition_and_sense(struct se_cmd *, sense_reason_t, int); - +int target_get_sess_cmd(struct se_session *, struct se_cmd *, bool); int target_put_sess_cmd(struct se_session *, struct se_cmd *); void target_sess_cmd_list_set_waiting(struct se_session *); void target_wait_for_sess_cmds(struct se_session *, int); |