qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 01/16] scsi-disk: no need to call scsi_req_data on a short read
Date: Thu, 04 Aug 2011 15:46:42 +0200	[thread overview]
Message-ID: <4E3AA2C2.30902@redhat.com> (raw)
In-Reply-To: <CAJSP0QWuY891t3fNb5cFFjFwvAGhvHkNx7eP7hgA8rbc=emFRg@mail.gmail.com>

Am 04.08.2011 15:35, schrieb Stefan Hajnoczi:
> On Wed, Aug 3, 2011 at 9:49 AM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>> 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).
>>
>> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>> ---
>>  hw/scsi-disk.c |    3 ---
>>  1 files changed, 0 insertions(+), 3 deletions(-)
>>
>> diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
>> index f42a5d1..814bf74 100644
>> --- a/hw/scsi-disk.c
>> +++ b/hw/scsi-disk.c
>> @@ -217,9 +217,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,
> 
> Kevin, do you remember why you added this in 5dba48a8?

No, I don't remember anything specific, I just tried to leave the
rerror=report case unchanged. This looks like it's moved code from
scsi_read_complete.

Kevin

  reply	other threads:[~2011-08-04 13:43 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-03  8:49 [Qemu-devel] [PATCH 00/16] SCSI sense and target request overhaul Paolo Bonzini
2011-08-03  8:49 ` [Qemu-devel] [PATCH 01/16] scsi-disk: no need to call scsi_req_data on a short read Paolo Bonzini
2011-08-03 16:32   ` Christoph Hellwig
2011-08-04 13:35   ` Stefan Hajnoczi
2011-08-04 13:46     ` Kevin Wolf [this message]
2011-08-03  8:49 ` [Qemu-devel] [PATCH 02/16] vscsi: always use get_sense Paolo Bonzini
2011-08-03 16:32   ` Christoph Hellwig
2011-08-03  8:49 ` [Qemu-devel] [PATCH 03/16] scsi: pass status when completing Paolo Bonzini
2011-08-03 16:34   ` Christoph Hellwig
2011-08-03  8:49 ` [Qemu-devel] [PATCH 04/16] scsi: move sense handling to generic code Paolo Bonzini
2011-08-03 16:34   ` Christoph Hellwig
2011-08-03  8:49 ` [Qemu-devel] [PATCH 05/16] scsi: introduce SCSIReqOps Paolo Bonzini
2011-08-03  8:49 ` [Qemu-devel] [PATCH 06/16] scsi: move request-related callbacks from SCSIDeviceInfo to SCSIReqOps Paolo Bonzini
2011-08-03  8:49 ` [Qemu-devel] [PATCH 07/16] scsi: pass cdb already to scsi_req_new Paolo Bonzini
2011-08-03  8:49 ` [Qemu-devel] [PATCH 08/16] scsi: introduce SCSICommand Paolo Bonzini
2011-08-03  8:49 ` [Qemu-devel] [PATCH 09/16] scsi: push lun field to SCSIDevice Paolo Bonzini
2011-08-03  8:49 ` [Qemu-devel] [PATCH 10/16] scsi: move request parsing to common code Paolo Bonzini
2011-08-12 16:12   ` Peter Maydell
2011-08-12 17:05     ` Paolo Bonzini
2011-08-12 16:55   ` Peter Maydell
2011-08-12 17:11     ` Paolo Bonzini
2011-08-03  8:49 ` [Qemu-devel] [PATCH 11/16] scsi: move handling of REPORT LUNS and invalid LUNs " Paolo Bonzini
2011-08-03  8:49 ` [Qemu-devel] [PATCH 12/16] scsi: move handling of REQUEST SENSE " Paolo Bonzini
2011-08-03  8:49 ` [Qemu-devel] [PATCH 13/16] scsi: add a bunch more common sense codes Paolo Bonzini
2011-08-03  8:49 ` [Qemu-devel] [PATCH 14/16] scsi: add support for unit attention conditions Paolo Bonzini
2011-08-03  8:49 ` [Qemu-devel] [PATCH 15/16] scsi: report unit attention on reset Paolo Bonzini
2011-08-03  8:49 ` [Qemu-devel] [PATCH 16/16] scsi: add special traces for common commands Paolo Bonzini
2011-08-12 13:49 ` [Qemu-devel] [PATCH 00/16] SCSI sense and target request overhaul Anthony Liguori
2011-08-12 15:48   ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E3AA2C2.30902@redhat.com \
    --to=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).