[PATCH 1/2] [SCSI] Log thin provisioning threshold event

shyam.iyer.t
2011-02-26T07:00:17Z

From: Shyam Iyer <shyam_iyer@dell.com>

At least log the message that we received a THIN PROVISIONING SOFT THRESHOLD REACHED
Unit Attention

Signed-off-by: Shyam Iyer <shyam_iyer@dell.com>
---
drivers/scsi/scsi_error.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 991de3c..98a1da0 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -320,6 +320,12 @@ static int scsi_check_sense(struct scsi_cmnd *scmd)
"changed. The Linux SCSI layer does not "
"automatically adjust these parameters.\n");

+ if (sshdr.asc == 0x38 && sshdr.ascq == 0x07)
+ scmd_printk(KERN_WARNING, scmd,
+ "Warning! Received an indication that the "
+ "LUN reached a thin provisioning soft "
+ "threshold.\n");
+
/*
* Pass the UA upwards for a determination in the completion
* functions.
--
1.7.2.3