Skip to content

Commit

Permalink
[SCSI] Log thin provisioning threshold event
Browse files Browse the repository at this point in the history
At least log the message that we received a THIN PROVISIONING SOFT
THRESHOLD REACHED Unit Attention.  Also added it to unit attention
decodes.

Signed-off-by: Shyam Iyer <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
  • Loading branch information
shiyer authored and James Bottomley committed Apr 15, 2011
1 parent 5853b4f commit deb1cb6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/scsi/constants.c
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,7 @@ static const struct error_info additional[] =
{0x3802, "Esn - power management class event"},
{0x3804, "Esn - media class event"},
{0x3806, "Esn - device busy class event"},
{0x3807, "Thin Provisioning soft threshold reached"},

{0x3900, "Saving parameters not supported"},

Expand Down
6 changes: 6 additions & 0 deletions drivers/scsi/scsi_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,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.
Expand Down

0 comments on commit deb1cb6

Please sign in to comment.