aboutsummaryrefslogtreecommitdiffstats
path: root/include/target/target_core_base.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/target/target_core_base.h')
-rw-r--r--include/target/target_core_base.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index 9ec9864ecf38..23c518a0340c 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -108,6 +108,8 @@
108#define DA_EMULATE_ALUA 0 108#define DA_EMULATE_ALUA 0
109/* Enforce SCSI Initiator Port TransportID with 'ISID' for PR */ 109/* Enforce SCSI Initiator Port TransportID with 'ISID' for PR */
110#define DA_ENFORCE_PR_ISIDS 1 110#define DA_ENFORCE_PR_ISIDS 1
111/* Force SPC-3 PR Activate Persistence across Target Power Loss */
112#define DA_FORCE_PR_APTPL 0
111#define DA_STATUS_MAX_SECTORS_MIN 16 113#define DA_STATUS_MAX_SECTORS_MIN 16
112#define DA_STATUS_MAX_SECTORS_MAX 8192 114#define DA_STATUS_MAX_SECTORS_MAX 8192
113/* By default don't report non-rotating (solid state) medium */ 115/* By default don't report non-rotating (solid state) medium */
@@ -680,6 +682,7 @@ struct se_dev_attrib {
680 enum target_prot_type pi_prot_type; 682 enum target_prot_type pi_prot_type;
681 enum target_prot_type hw_pi_prot_type; 683 enum target_prot_type hw_pi_prot_type;
682 int enforce_pr_isids; 684 int enforce_pr_isids;
685 int force_pr_aptpl;
683 int is_nonrot; 686 int is_nonrot;
684 int emulate_rest_reord; 687 int emulate_rest_reord;
685 u32 hw_block_size; 688 u32 hw_block_size;
@@ -903,4 +906,18 @@ struct se_wwn {
903 struct config_group fabric_stat_group; 906 struct config_group fabric_stat_group;
904}; 907};
905 908
909static inline void atomic_inc_mb(atomic_t *v)
910{
911 smp_mb__before_atomic();
912 atomic_inc(v);
913 smp_mb__after_atomic();
914}
915
916static inline void atomic_dec_mb(atomic_t *v)
917{
918 smp_mb__before_atomic();
919 atomic_dec(v);
920 smp_mb__after_atomic();
921}
922
906#endif /* TARGET_CORE_BASE_H */ 923#endif /* TARGET_CORE_BASE_H */