diff options
author | Hannes Reinecke <hare@suse.de> | 2013-07-01 09:16:25 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-08-23 12:43:54 -0400 |
commit | a9d6ceb838755c24dde8a0ca02c3378926fc63db (patch) | |
tree | 8239e44e9bee3029e31ee1ac04b14b73f5f500d1 /drivers/scsi/scsi_error.c | |
parent | 87f14e658f664a17dcdb38d3f6ae70642fcdc263 (diff) |
[SCSI] return ENOSPC on thin provisioning failure
When the thin provisioning hard threshold is reached we
should return ENOSPC to inform upper layers about this fact.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/scsi_error.c')
-rw-r--r-- | drivers/scsi/scsi_error.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index 7be5229ed3a4..1b1298ce0e71 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
@@ -354,11 +354,16 @@ static int scsi_check_sense(struct scsi_cmnd *scmd) | |||
354 | return SUCCESS; | 354 | return SUCCESS; |
355 | 355 | ||
356 | /* these are not supported */ | 356 | /* these are not supported */ |
357 | case DATA_PROTECT: | ||
358 | if (sshdr.asc == 0x27 && sshdr.ascq == 0x07) { | ||
359 | /* Thin provisioning hard threshold reached */ | ||
360 | set_host_byte(scmd, DID_ALLOC_FAILURE); | ||
361 | return SUCCESS; | ||
362 | } | ||
357 | case COPY_ABORTED: | 363 | case COPY_ABORTED: |
358 | case VOLUME_OVERFLOW: | 364 | case VOLUME_OVERFLOW: |
359 | case MISCOMPARE: | 365 | case MISCOMPARE: |
360 | case BLANK_CHECK: | 366 | case BLANK_CHECK: |
361 | case DATA_PROTECT: | ||
362 | set_host_byte(scmd, DID_TARGET_FAILURE); | 367 | set_host_byte(scmd, DID_TARGET_FAILURE); |
363 | return SUCCESS; | 368 | return SUCCESS; |
364 | 369 | ||