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