Thanks for your feedback.
Here is a second try to allows to propagate scsi error code from host->guest.
Makes sense?
Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]>
---
drivers/block/virtio_blk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: kvm/drivers/block/virtio_blk.c
===================================================================
--- kvm.orig/drivers/block/virtio_blk.c
+++ kvm/drivers/block/virtio_blk.c
@@ -62,7 +62,7 @@ static void blk_done(struct virtqueue *v
break;
}
- if (blk_pc_request(vbr->req)) {
+ if (blk_pc_request(vbr->req) && len >= sizeof(vbr->in_hdr)) {
vbr->req->data_len = vbr->in_hdr.residual;
bytes = vbr->in_hdr.data_len;
vbr->req->sense_len = vbr->in_hdr.sense_len;
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html