Skip to content
  • Paolo Bonzini's avatar
    scsi: do not call transfer_data after canceling a request · e88c591d
    Paolo Bonzini authored
    
    
    Otherwise, if cancellation is "faked" by the AIO layer and goes
    through qemu_aio_flush, the whole request is completed synchronously
    during scsi_req_cancel.
    
    Using the enqueued flag would work here, but not in the next patches,
    so I'm introducing a new io_canceled flag.  That's because scsi_req_data
    is a synchronous callback and the enqueued flag might be reset by the
    time it returns.  scsi-disk cannot unref the request until after calling
    scsi_req_data.
    
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
    e88c591d