diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-22 13:52:03 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-22 13:52:03 -0500 |
| commit | b0e3636f656c98bdeded5aaa78601e3256b18d6d (patch) | |
| tree | 8b2096769179967bd3c186cf79c232f21fa1d1a1 /include | |
| parent | 0032cdefff0f4ff5bd9464036d510a5441ec8b83 (diff) | |
| parent | 86784c6bdeeef78eed94d298be7a8879f6a97ee2 (diff) | |
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull SCSI target updates from Nicholas Bellinger:
"Things have been quiet this round with mostly bugfixes, percpu
conversions, and other minor iscsi-target conformance testing changes.
The highlights include:
- Add demo_mode_discovery attribute for iscsi-target (Thomas)
- Convert tcm_fc(FCoE) to use percpu-ida pre-allocation
- Add send completion interrupt coalescing for ib_isert
- Convert target-core to use percpu-refcounting for se_lun
- Fix mutex_trylock usage bug in iscsit_increment_maxcmdsn
- tcm_loop updates (Hannes)
- target-core ALUA cleanups + prep for v3.14 SCSI Referrals support (Hannes)
v3.14 is currently shaping to be a busy development cycle in target
land, with initial support for T10 Referrals and T10 DIF currently on
the roadmap"
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (40 commits)
iscsi-target: chap auth shouldn't match username with trailing garbage
iscsi-target: fix extract_param to handle buffer length corner case
iscsi-target: Expose default_erl as TPG attribute
target_core_configfs: split up ALUA supported states
target_core_alua: Make supported states configurable
target_core_alua: Store supported ALUA states
target_core_alua: Rename ALUA_ACCESS_STATE_OPTIMIZED
target_core_alua: spellcheck
target core: rename (ex,im)plict -> (ex,im)plicit
percpu-refcount: Add percpu-refcount.o to obj-y
iscsi-target: Do not reject non-immediate CmdSNs exceeding MaxCmdSN
iscsi-target: Convert iscsi_session statistics to atomic_long_t
target: Convert se_device statistics to atomic_long_t
target: Fix delayed Task Aborted Status (TAS) handling bug
iscsi-target: Reject unsupported multi PDU text command sequence
ib_isert: Avoid duplicate iscsit_increment_maxcmdsn call
iscsi-target: Fix mutex_trylock usage in iscsit_increment_maxcmdsn
target: Core does not need blkdev.h
target: Pass through I/O topology for block backstores
iser-target: Avoid using FRMR for single dma entry requests
...
Diffstat (limited to 'include')
| -rw-r--r-- | include/target/target_core_backend.h | 5 | ||||
| -rw-r--r-- | include/target/target_core_base.h | 84 | ||||
| -rw-r--r-- | include/target/target_core_configfs.h | 1 | ||||
| -rw-r--r-- | include/target/target_core_fabric.h | 2 |
4 files changed, 49 insertions, 43 deletions
diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h index 5ebe21cd5d1c..39e0114d70c5 100644 --- a/include/target/target_core_backend.h +++ b/include/target/target_core_backend.h | |||
| @@ -34,6 +34,11 @@ struct se_subsystem_api { | |||
| 34 | sense_reason_t (*parse_cdb)(struct se_cmd *cmd); | 34 | sense_reason_t (*parse_cdb)(struct se_cmd *cmd); |
| 35 | u32 (*get_device_type)(struct se_device *); | 35 | u32 (*get_device_type)(struct se_device *); |
| 36 | sector_t (*get_blocks)(struct se_device *); | 36 | sector_t (*get_blocks)(struct se_device *); |
| 37 | sector_t (*get_alignment_offset_lbas)(struct se_device *); | ||
| 38 | /* lbppbe = logical blocks per physical block exponent. see SBC-3 */ | ||
| 39 | unsigned int (*get_lbppbe)(struct se_device *); | ||
| 40 | unsigned int (*get_io_min)(struct se_device *); | ||
| 41 | unsigned int (*get_io_opt)(struct se_device *); | ||
| 37 | unsigned char *(*get_sense_buffer)(struct se_cmd *); | 42 | unsigned char *(*get_sense_buffer)(struct se_cmd *); |
| 38 | bool (*get_write_cache)(struct se_device *); | 43 | bool (*get_write_cache)(struct se_device *); |
| 39 | }; | 44 | }; |
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 5bdb8b7d2a69..45412a6afa69 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
| @@ -227,6 +227,7 @@ enum tcm_tmreq_table { | |||
| 227 | 227 | ||
| 228 | /* fabric independent task management response values */ | 228 | /* fabric independent task management response values */ |
| 229 | enum tcm_tmrsp_table { | 229 | enum tcm_tmrsp_table { |
| 230 | TMR_FUNCTION_FAILED = 0, | ||
| 230 | TMR_FUNCTION_COMPLETE = 1, | 231 | TMR_FUNCTION_COMPLETE = 1, |
| 231 | TMR_TASK_DOES_NOT_EXIST = 2, | 232 | TMR_TASK_DOES_NOT_EXIST = 2, |
| 232 | TMR_LUN_DOES_NOT_EXIST = 3, | 233 | TMR_LUN_DOES_NOT_EXIST = 3, |
| @@ -282,11 +283,12 @@ struct t10_alua_lu_gp_member { | |||
| 282 | struct t10_alua_tg_pt_gp { | 283 | struct t10_alua_tg_pt_gp { |
| 283 | u16 tg_pt_gp_id; | 284 | u16 tg_pt_gp_id; |
| 284 | int tg_pt_gp_valid_id; | 285 | int tg_pt_gp_valid_id; |
| 286 | int tg_pt_gp_alua_supported_states; | ||
| 285 | int tg_pt_gp_alua_access_status; | 287 | int tg_pt_gp_alua_access_status; |
| 286 | int tg_pt_gp_alua_access_type; | 288 | int tg_pt_gp_alua_access_type; |
| 287 | int tg_pt_gp_nonop_delay_msecs; | 289 | int tg_pt_gp_nonop_delay_msecs; |
| 288 | int tg_pt_gp_trans_delay_msecs; | 290 | int tg_pt_gp_trans_delay_msecs; |
| 289 | int tg_pt_gp_implict_trans_secs; | 291 | int tg_pt_gp_implicit_trans_secs; |
| 290 | int tg_pt_gp_pref; | 292 | int tg_pt_gp_pref; |
| 291 | int tg_pt_gp_write_metadata; | 293 | int tg_pt_gp_write_metadata; |
| 292 | /* Used by struct t10_alua_tg_pt_gp->tg_pt_gp_md_buf_len */ | 294 | /* Used by struct t10_alua_tg_pt_gp->tg_pt_gp_md_buf_len */ |
| @@ -442,7 +444,6 @@ struct se_cmd { | |||
| 442 | /* Used for sense data */ | 444 | /* Used for sense data */ |
| 443 | void *sense_buffer; | 445 | void *sense_buffer; |
| 444 | struct list_head se_delayed_node; | 446 | struct list_head se_delayed_node; |
| 445 | struct list_head se_lun_node; | ||
| 446 | struct list_head se_qf_node; | 447 | struct list_head se_qf_node; |
| 447 | struct se_device *se_dev; | 448 | struct se_device *se_dev; |
| 448 | struct se_dev_entry *se_deve; | 449 | struct se_dev_entry *se_deve; |
| @@ -470,15 +471,11 @@ struct se_cmd { | |||
| 470 | #define CMD_T_SENT (1 << 4) | 471 | #define CMD_T_SENT (1 << 4) |
| 471 | #define CMD_T_STOP (1 << 5) | 472 | #define CMD_T_STOP (1 << 5) |
| 472 | #define CMD_T_FAILED (1 << 6) | 473 | #define CMD_T_FAILED (1 << 6) |
| 473 | #define CMD_T_LUN_STOP (1 << 7) | 474 | #define CMD_T_DEV_ACTIVE (1 << 7) |
| 474 | #define CMD_T_LUN_FE_STOP (1 << 8) | 475 | #define CMD_T_REQUEST_STOP (1 << 8) |
| 475 | #define CMD_T_DEV_ACTIVE (1 << 9) | 476 | #define CMD_T_BUSY (1 << 9) |
| 476 | #define CMD_T_REQUEST_STOP (1 << 10) | ||
| 477 | #define CMD_T_BUSY (1 << 11) | ||
| 478 | spinlock_t t_state_lock; | 477 | spinlock_t t_state_lock; |
| 479 | struct completion t_transport_stop_comp; | 478 | struct completion t_transport_stop_comp; |
| 480 | struct completion transport_lun_fe_stop_comp; | ||
| 481 | struct completion transport_lun_stop_comp; | ||
| 482 | 479 | ||
| 483 | struct work_struct work; | 480 | struct work_struct work; |
| 484 | 481 | ||
| @@ -498,6 +495,9 @@ struct se_cmd { | |||
| 498 | 495 | ||
| 499 | /* backend private data */ | 496 | /* backend private data */ |
| 500 | void *priv; | 497 | void *priv; |
| 498 | |||
| 499 | /* Used for lun->lun_ref counting */ | ||
| 500 | bool lun_ref_active; | ||
| 501 | }; | 501 | }; |
| 502 | 502 | ||
| 503 | struct se_ua { | 503 | struct se_ua { |
| @@ -628,6 +628,34 @@ struct se_dev_attrib { | |||
| 628 | struct config_group da_group; | 628 | struct config_group da_group; |
| 629 | }; | 629 | }; |
| 630 | 630 | ||
| 631 | struct se_port_stat_grps { | ||
| 632 | struct config_group stat_group; | ||
| 633 | struct config_group scsi_port_group; | ||
| 634 | struct config_group scsi_tgt_port_group; | ||
| 635 | struct config_group scsi_transport_group; | ||
| 636 | }; | ||
| 637 | |||
| 638 | struct se_lun { | ||
| 639 | #define SE_LUN_LINK_MAGIC 0xffff7771 | ||
| 640 | u32 lun_link_magic; | ||
| 641 | /* See transport_lun_status_table */ | ||
| 642 | enum transport_lun_status_table lun_status; | ||
| 643 | u32 lun_access; | ||
| 644 | u32 lun_flags; | ||
| 645 | u32 unpacked_lun; | ||
| 646 | atomic_t lun_acl_count; | ||
| 647 | spinlock_t lun_acl_lock; | ||
| 648 | spinlock_t lun_sep_lock; | ||
| 649 | struct completion lun_shutdown_comp; | ||
| 650 | struct list_head lun_acl_list; | ||
| 651 | struct se_device *lun_se_dev; | ||
| 652 | struct se_port *lun_sep; | ||
| 653 | struct config_group lun_group; | ||
| 654 | struct se_port_stat_grps port_stat_grps; | ||
| 655 | struct completion lun_ref_comp; | ||
| 656 | struct percpu_ref lun_ref; | ||
| 657 | }; | ||
| 658 | |||
| 631 | struct se_dev_stat_grps { | 659 | struct se_dev_stat_grps { |
| 632 | struct config_group stat_group; | 660 | struct config_group stat_group; |
| 633 | struct config_group scsi_dev_group; | 661 | struct config_group scsi_dev_group; |
| @@ -656,11 +684,10 @@ struct se_device { | |||
| 656 | /* Pointer to transport specific device structure */ | 684 | /* Pointer to transport specific device structure */ |
| 657 | u32 dev_index; | 685 | u32 dev_index; |
| 658 | u64 creation_time; | 686 | u64 creation_time; |
| 659 | u32 num_resets; | 687 | atomic_long_t num_resets; |
| 660 | u64 num_cmds; | 688 | atomic_long_t num_cmds; |
| 661 | u64 read_bytes; | 689 | atomic_long_t read_bytes; |
| 662 | u64 write_bytes; | 690 | atomic_long_t write_bytes; |
| 663 | spinlock_t stats_lock; | ||
| 664 | /* Active commands on this virtual SE device */ | 691 | /* Active commands on this virtual SE device */ |
| 665 | atomic_t simple_cmds; | 692 | atomic_t simple_cmds; |
| 666 | atomic_t dev_ordered_id; | 693 | atomic_t dev_ordered_id; |
| @@ -711,6 +738,7 @@ struct se_device { | |||
| 711 | struct se_subsystem_api *transport; | 738 | struct se_subsystem_api *transport; |
| 712 | /* Linked list for struct se_hba struct se_device list */ | 739 | /* Linked list for struct se_hba struct se_device list */ |
| 713 | struct list_head dev_list; | 740 | struct list_head dev_list; |
| 741 | struct se_lun xcopy_lun; | ||
| 714 | }; | 742 | }; |
| 715 | 743 | ||
| 716 | struct se_hba { | 744 | struct se_hba { |
| @@ -730,34 +758,6 @@ struct se_hba { | |||
| 730 | struct se_subsystem_api *transport; | 758 | struct se_subsystem_api *transport; |
| 731 | }; | 759 | }; |
| 732 | 760 | ||
| 733 | struct se_port_stat_grps { | ||
| 734 | struct config_group stat_group; | ||
| 735 | struct config_group scsi_port_group; | ||
| 736 | struct config_group scsi_tgt_port_group; | ||
| 737 | struct config_group scsi_transport_group; | ||
| 738 | }; | ||
| 739 | |||
| 740 | struct se_lun { | ||
| 741 | #define SE_LUN_LINK_MAGIC 0xffff7771 | ||
| 742 | u32 lun_link_magic; | ||
| 743 | /* See transport_lun_status_table */ | ||
| 744 | enum transport_lun_status_table lun_status; | ||
| 745 | u32 lun_access; | ||
| 746 | u32 lun_flags; | ||
| 747 | u32 unpacked_lun; | ||
| 748 | atomic_t lun_acl_count; | ||
| 749 | spinlock_t lun_acl_lock; | ||
| 750 | spinlock_t lun_cmd_lock; | ||
| 751 | spinlock_t lun_sep_lock; | ||
| 752 | struct completion lun_shutdown_comp; | ||
| 753 | struct list_head lun_cmd_list; | ||
| 754 | struct list_head lun_acl_list; | ||
| 755 | struct se_device *lun_se_dev; | ||
| 756 | struct se_port *lun_sep; | ||
| 757 | struct config_group lun_group; | ||
| 758 | struct se_port_stat_grps port_stat_grps; | ||
| 759 | }; | ||
| 760 | |||
| 761 | struct scsi_port_stats { | 761 | struct scsi_port_stats { |
| 762 | u64 cmd_pdus; | 762 | u64 cmd_pdus; |
| 763 | u64 tx_data_octets; | 763 | u64 tx_data_octets; |
diff --git a/include/target/target_core_configfs.h b/include/target/target_core_configfs.h index 713c5004f4ae..e0801386e4dc 100644 --- a/include/target/target_core_configfs.h +++ b/include/target/target_core_configfs.h | |||
| @@ -54,4 +54,3 @@ struct target_fabric_configfs { | |||
| 54 | struct target_fabric_configfs_template tf_cit_tmpl; | 54 | struct target_fabric_configfs_template tf_cit_tmpl; |
| 55 | }; | 55 | }; |
| 56 | 56 | ||
| 57 | #define TF_CIT_TMPL(tf) (&(tf)->tf_cit_tmpl) | ||
diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h index 882b650e32be..4cf4fda404a3 100644 --- a/include/target/target_core_fabric.h +++ b/include/target/target_core_fabric.h | |||
| @@ -137,6 +137,8 @@ void transport_generic_request_failure(struct se_cmd *, sense_reason_t); | |||
| 137 | void __target_execute_cmd(struct se_cmd *); | 137 | void __target_execute_cmd(struct se_cmd *); |
| 138 | int transport_lookup_tmr_lun(struct se_cmd *, u32); | 138 | int transport_lookup_tmr_lun(struct se_cmd *, u32); |
| 139 | 139 | ||
| 140 | struct se_node_acl *core_tpg_get_initiator_node_acl(struct se_portal_group *tpg, | ||
| 141 | unsigned char *); | ||
| 140 | struct se_node_acl *core_tpg_check_initiator_node_acl(struct se_portal_group *, | 142 | struct se_node_acl *core_tpg_check_initiator_node_acl(struct se_portal_group *, |
| 141 | unsigned char *); | 143 | unsigned char *); |
| 142 | void core_tpg_clear_object_luns(struct se_portal_group *); | 144 | void core_tpg_clear_object_luns(struct se_portal_group *); |
