diff options
author | Hannes Reinecke <hare@suse.de> | 2013-07-01 15:16:25 +0200 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-08-23 12:43:54 -0400 |
commit | a9d6ceb838755c24dde8a0ca02c3378926fc63db (patch) | |
tree | 8239e44e9bee3029e31ee1ac04b14b73f5f500d1 /drivers/scsi/scsi_lib.c | |
parent | 87f14e658f664a17dcdb38d3f6ae70642fcdc263 (diff) | |
download | blackbird-obmc-linux-a9d6ceb838755c24dde8a0ca02c3378926fc63db.tar.gz blackbird-obmc-linux-a9d6ceb838755c24dde8a0ca02c3378926fc63db.zip |
[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_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index e2af8ae0d0ca..49020d52d685 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -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; |