scst: improve thin provisioning support

This patch adds gen_tp_soft_threshold_reached_UA attribute for thin
provisioned devices that allows to generate THIN PROVISIONING SOFT
THRESHOLD REACHED Unit Attention.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7071 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2016-12-20 06:07:55 +00:00
parent 5040dd22a4
commit 4e1dc1b526
6 changed files with 97 additions and 13 deletions
+2
View File
@@ -5665,6 +5665,8 @@ void scst_path_put(struct nameidata *nd);
#endif
int scst_remove_file(const char *name);
void scst_set_tp_soft_threshold_reached_UA(struct scst_tgt_dev *tgt_dev);
int scst_pr_set_cluster_mode(struct scst_device *dev, bool cluster_mode,
const char *cl_dev_id);
int scst_pr_init_dev(struct scst_device *dev);
+3 -1
View File
@@ -337,11 +337,13 @@ static inline int scst_sense_response_code(const uint8_t *sense)
#define scst_sense_asym_access_state_changed UNIT_ATTENTION, 0x2A, 0x06
#define scst_sense_capacity_data_changed UNIT_ATTENTION, 0x2A, 0x9
#define scst_sense_cleared_by_another_ini_UA UNIT_ATTENTION, 0x2F, 0
#define scst_sense_tp_soft_threshold_reached UNIT_ATTENTION, 0x38, 0x7
#define scst_sense_inquiry_data_changed UNIT_ATTENTION, 0x3F, 0x3
#define scst_sense_reported_luns_data_changed UNIT_ATTENTION, 0x3F, 0xE
/* DATA_PROTECT is 7 */
#define scst_sense_data_protect DATA_PROTECT, 0x27, 0
#define scst_sense_data_protect DATA_PROTECT, 0x00, 0
#define scst_space_allocation_failed_write_protect DATA_PROTECT, 0x27, 7
/* ABORTED_COMMAND is 0xb */
#define scst_sense_aborted_command ABORTED_COMMAND, 0x00, 0