[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>
This commit is contained in:

committed by
James Bottomley

parent
87f14e658f
commit
a9d6ceb838
@@ -726,6 +726,7 @@ EXPORT_SYMBOL(scsi_release_buffers);
|
||||
* -ENOLINK temporary transport failure
|
||||
* -EREMOTEIO permanent target failure, do not retry
|
||||
* -EBADE permanent nexus failure, retry on other path
|
||||
* -ENOSPC No write space available
|
||||
* -EIO unspecified I/O error
|
||||
*/
|
||||
static int __scsi_error_from_host_byte(struct scsi_cmnd *cmd, int result)
|
||||
@@ -744,6 +745,10 @@ static int __scsi_error_from_host_byte(struct scsi_cmnd *cmd, int result)
|
||||
set_host_byte(cmd, DID_OK);
|
||||
error = -EBADE;
|
||||
break;
|
||||
case DID_ALLOC_FAILURE:
|
||||
set_host_byte(cmd, DID_OK);
|
||||
error = -ENOSPC;
|
||||
break;
|
||||
default:
|
||||
error = -EIO;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user