[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>
diff --git a/block/blk-core.c b/block/blk-core.c
index 93a18d1..68ce4d5 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -2318,6 +2318,9 @@
case -ETIMEDOUT:
error_type = "timeout";
break;
+ case -ENOSPC:
+ error_type = "critical space allocation";
+ break;
case -EIO:
default:
error_type = "I/O";