summaryrefslogtreecommitdiffstats
path: root/hw/scsi/scsi-disk.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-01-23 13:57:21 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2014-02-22 10:02:23 +0100
commit703dd81aca15ef1d91dba013b6b66c6e3ff88628 (patch)
treed121e340885b7b410bf323b9307685af5dc656f8 /hw/scsi/scsi-disk.c
parentc5f52875b980e54e6bebad6121c76863356e1d7f (diff)
downloadhqemu-703dd81aca15ef1d91dba013b6b66c6e3ff88628.zip
hqemu-703dd81aca15ef1d91dba013b6b66c6e3ff88628.tar.gz
scsi: report thin provisioning errors with werror=report
SCSI defines a status code for when a thin-provisioned LUNs would exceed the allocated space, map ENOSPC to it. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/scsi/scsi-disk.c')
-rw-r--r--hw/scsi/scsi-disk.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index b4fadd2..d614148 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw/scsi/scsi-disk.c
@@ -428,6 +428,9 @@ static int scsi_handle_rw_error(SCSIDiskReq *r, int error)
case EINVAL:
scsi_check_condition(r, SENSE_CODE(INVALID_FIELD));
break;
+ case ENOSPC:
+ scsi_check_condition(r, SENSE_CODE(SPACE_ALLOC_FAILED));
+ break;
default:
scsi_check_condition(r, SENSE_CODE(IO_ERROR));
break;
OpenPOWER on IntegriCloud