From: Paolo Bonzini Date: Wed, 3 Aug 2011 08:49:04 +0000 (+0200) Subject: scsi-disk: no need to call scsi_req_data on a short read X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~2655 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fcd07d0f68a120efa58d2baa6dfc82a50ea53cb4;p=sdk%2Femulator%2Fqemu.git scsi-disk: no need to call scsi_req_data on a short read In fact, if the HBA's transfer_data callback goes on with scsi_req_continue the request will be completed successfully instead of showing a failure. It can even cause a segmentation fault. An easy way to trigger it is "eject -f cd" during installation (during media test if the installer does something like that). Reviewed-by: Christoph Hellwig Signed-off-by: Paolo Bonzini Signed-off-by: Anthony Liguori --- diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index fa198f928c..e38d9f0b75 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -214,9 +214,6 @@ static int scsi_handle_rw_error(SCSIDiskReq *r, int error, int type) bdrv_mon_event(s->bs, BDRV_ACTION_STOP, is_read); vm_stop(VMSTOP_DISKFULL); } else { - if (type == SCSI_REQ_STATUS_RETRY_READ) { - scsi_req_data(&r->req, 0); - } switch (error) { case ENOMEM: scsi_command_complete(r, CHECK_CONDITION,