]> git.proxmox.com Git - mirror_qemu.git/commit
iscsi: Translate scsi sense into error code
authorFam Zheng <famz@redhat.com>
Thu, 5 Nov 2015 05:00:09 +0000 (13:00 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 5 Nov 2015 13:42:19 +0000 (14:42 +0100)
commite01dd3da5cf9aa90ae844d3b86c2c2762066edac
tree88af7d1274816f93d8f60f86935abf564fdd1608
parent6388acc853b7862761d3c2864be99033e8b62dcc
iscsi: Translate scsi sense into error code

Previously we return -EIO blindly when anything goes wrong. Add a helper
function to parse sense fields and try to make the return code more
meaningful.

This also fixes the default werror configuration (enospc) when we're
using qcow2 on an iscsi lun. The old -EIO not being treated as out of
space error failed to trigger vm stop.

Signed-off-by: Fam Zheng <famz@redhat.com>
Message-Id: <1446699609-11376-1-git-send-email-famz@redhat.com>
[libiscsi 1.9 compatibility - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
block/iscsi.c