You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
3.5 KiB
78 lines
3.5 KiB
6 years ago
|
From 80ef1807ef0c11ec5940d5763b12f3c0d4b6d32e Mon Sep 17 00:00:00 2001
|
||
|
From: Peter Lieven <pl@kamp.de>
|
||
|
Date: Mon, 11 Mar 2013 12:13:42 +0100
|
||
|
Subject: [RHEL7 libiscsi PATCH 03/18] Add ASCQ codes related to thin-provisioning
|
||
|
|
||
|
Signed-off-by: Peter Lieven <pl@kamp.de>
|
||
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
||
|
(cherry-picked from upstream commit 80ef1807ef0c11ec5940d5763b12f3c0d4b6d32e)
|
||
|
---
|
||
|
include/scsi-lowlevel.h | 31 +++++++++++++++++--------------
|
||
|
lib/scsi-lowlevel.c | 6 ++++++
|
||
|
2 files changed, 23 insertions(+), 14 deletions(-)
|
||
|
|
||
|
diff --git a/include/scsi-lowlevel.h b/include/scsi-lowlevel.h
|
||
|
index cd1abd4..07d39be 100644
|
||
|
--- a/include/scsi-lowlevel.h
|
||
|
+++ b/include/scsi-lowlevel.h
|
||
|
@@ -144,20 +144,23 @@ enum scsi_sense_key {
|
||
|
EXTERN const char *scsi_sense_key_str(int key);
|
||
|
|
||
|
/* ascq */
|
||
|
-#define SCSI_SENSE_ASCQ_MISCOMPARE_DURING_VERIFY 0x1d00
|
||
|
-#define SCSI_SENSE_ASCQ_INVALID_OPERATION_CODE 0x2000
|
||
|
-#define SCSI_SENSE_ASCQ_LBA_OUT_OF_RANGE 0x2100
|
||
|
-#define SCSI_SENSE_ASCQ_INVALID_FIELD_IN_CDB 0x2400
|
||
|
-#define SCSI_SENSE_ASCQ_LOGICAL_UNIT_NOT_SUPPORTED 0x2500
|
||
|
-#define SCSI_SENSE_ASCQ_WRITE_PROTECTED 0x2700
|
||
|
-#define SCSI_SENSE_ASCQ_BUS_RESET 0x2900
|
||
|
-#define SCSI_SENSE_ASCQ_CAPACITY_DATA_HAS_CHANGED 0x2a09
|
||
|
-#define SCSI_SENSE_ASCQ_MEDIUM_NOT_PRESENT 0x3a00
|
||
|
-#define SCSI_SENSE_ASCQ_MEDIUM_NOT_PRESENT_TRAY_CLOSED 0x3a01
|
||
|
-#define SCSI_SENSE_ASCQ_MEDIUM_NOT_PRESENT_TRAY_OPEN 0x3a02
|
||
|
-#define SCSI_SENSE_ASCQ_INTERNAL_TARGET_FAILURE 0x4400
|
||
|
-#define SCSI_SENSE_ASCQ_MEDIUM_LOAD_OR_EJECT_FAILED 0x5300
|
||
|
-#define SCSI_SENSE_ASCQ_MEDIUM_REMOVAL_PREVENTED 0x5302
|
||
|
+#define SCSI_SENSE_ASCQ_MISCOMPARE_DURING_VERIFY 0x1d00
|
||
|
+#define SCSI_SENSE_ASCQ_INVALID_OPERATION_CODE 0x2000
|
||
|
+#define SCSI_SENSE_ASCQ_LBA_OUT_OF_RANGE 0x2100
|
||
|
+#define SCSI_SENSE_ASCQ_INVALID_FIELD_IN_CDB 0x2400
|
||
|
+#define SCSI_SENSE_ASCQ_LOGICAL_UNIT_NOT_SUPPORTED 0x2500
|
||
|
+#define SCSI_SENSE_ASCQ_WRITE_PROTECTED 0x2700
|
||
|
+#define SCSI_SENSE_ASCQ_BUS_RESET 0x2900
|
||
|
+#define SCSI_SENSE_ASCQ_MODE_PARAMETERS_CHANGED 0x2a01
|
||
|
+#define SCSI_SENSE_ASCQ_CAPACITY_DATA_HAS_CHANGED 0x2a09
|
||
|
+#define SCSI_SENSE_ASCQ_THIN_PROVISION_SOFT_THRES_REACHED 0x3807
|
||
|
+#define SCSI_SENSE_ASCQ_MEDIUM_NOT_PRESENT 0x3a00
|
||
|
+#define SCSI_SENSE_ASCQ_MEDIUM_NOT_PRESENT_TRAY_CLOSED 0x3a01
|
||
|
+#define SCSI_SENSE_ASCQ_MEDIUM_NOT_PRESENT_TRAY_OPEN 0x3a02
|
||
|
+#define SCSI_SENSE_ASCQ_INQUIRY_DATA_HAS_CHANGED 0x3f03
|
||
|
+#define SCSI_SENSE_ASCQ_INTERNAL_TARGET_FAILURE 0x4400
|
||
|
+#define SCSI_SENSE_ASCQ_MEDIUM_LOAD_OR_EJECT_FAILED 0x5300
|
||
|
+#define SCSI_SENSE_ASCQ_MEDIUM_REMOVAL_PREVENTED 0x5302
|
||
|
|
||
|
EXTERN const char *scsi_sense_ascq_str(int ascq);
|
||
|
|
||
|
diff --git a/lib/scsi-lowlevel.c b/lib/scsi-lowlevel.c
|
||
|
index b6af650..b49e873 100644
|
||
|
--- a/lib/scsi-lowlevel.c
|
||
|
+++ b/lib/scsi-lowlevel.c
|
||
|
@@ -149,8 +149,14 @@ scsi_sense_ascq_str(int ascq)
|
||
|
"MEDIUM_NOT_PRESENT-TRAY_OPEN"},
|
||
|
{SCSI_SENSE_ASCQ_BUS_RESET,
|
||
|
"BUS_RESET"},
|
||
|
+ {SCSI_SENSE_ASCQ_MODE_PARAMETERS_CHANGED,
|
||
|
+ "MODE PARAMETERS CHANGED"},
|
||
|
{SCSI_SENSE_ASCQ_CAPACITY_DATA_HAS_CHANGED,
|
||
|
"CAPACITY_DATA_HAS_CHANGED"},
|
||
|
+ {SCSI_SENSE_ASCQ_THIN_PROVISION_SOFT_THRES_REACHED,
|
||
|
+ "THIN PROVISIONING SOFT THRESHOLD REACHED"},
|
||
|
+ {SCSI_SENSE_ASCQ_INQUIRY_DATA_HAS_CHANGED,
|
||
|
+ "INQUIRY DATA HAS CHANGED"},
|
||
|
{SCSI_SENSE_ASCQ_INTERNAL_TARGET_FAILURE,
|
||
|
"INTERNAL_TARGET_FAILURE"},
|
||
|
{SCSI_SENSE_ASCQ_MISCOMPARE_DURING_VERIFY,
|
||
|
--
|
||
|
1.8.1.4
|
||
|
|