diff options
| author | Ingo Molnar <mingo@kernel.org> | 2013-12-17 09:27:08 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2013-12-17 09:27:08 -0500 |
| commit | bb799d3b980eb803ca2da4a4eefbd9308f8d988a (patch) | |
| tree | 69fbe0cd6d47b23a50f5e1d87bf7489532fae149 /include/target/target_core_base.h | |
| parent | 919fc6e34831d1c2b58bfb5ae261dc3facc9b269 (diff) | |
| parent | 319e2e3f63c348a9b66db4667efa73178e18b17d (diff) | |
Merge tag 'v3.13-rc4' into core/locking
Merge Linux 3.13-rc4, to refresh this rather old tree with the latest fixes.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/target/target_core_base.h')
| -rw-r--r-- | include/target/target_core_base.h | 84 |
1 files changed, 42 insertions, 42 deletions
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; |
