search for: bdrv_aio_readv

Displaying 4 results from an estimated 4 matches for "bdrv_aio_readv".

2009 Oct 27
1
[PATCH 2/4] megasas: LSI MegaRAID SAS HBA emulation
..._sense(cmd); + + qemu_iovec_init_external(&cmd->qiov, cmd->iov, cmd->sge_count); + if (write) + cmd->lun->aiocb = bdrv_aio_writev(cmd->lun->bdrv, lba_start, + &cmd->qiov, lba_count, + megasas_write_complete, cmd); + else + cmd->lun->aiocb = bdrv_aio_readv(cmd->lun->bdrv, lba_start, + &cmd->qiov, lba_count, + megasas_read_complete, cmd); + + if (!cmd->lun->aiocb) { + DPRINTF("SCSI %s dev %x lun %x aio failed\n", + write?"write":"read", target, lun); + megasas_unmap_sense(cmd, 0); + megasa...
2009 Oct 27
1
[PATCH 2/4] megasas: LSI MegaRAID SAS HBA emulation
..._sense(cmd); + + qemu_iovec_init_external(&cmd->qiov, cmd->iov, cmd->sge_count); + if (write) + cmd->lun->aiocb = bdrv_aio_writev(cmd->lun->bdrv, lba_start, + &cmd->qiov, lba_count, + megasas_write_complete, cmd); + else + cmd->lun->aiocb = bdrv_aio_readv(cmd->lun->bdrv, lba_start, + &cmd->qiov, lba_count, + megasas_read_complete, cmd); + + if (!cmd->lun->aiocb) { + DPRINTF("SCSI %s dev %x lun %x aio failed\n", + write?"write":"read", target, lun); + megasas_unmap_sense(cmd, 0); + megasa...
2009 Oct 27
2
[PATCH 3/4] scsi-disk: Factor out SCSI command emulation
...if (n > SCSI_DMA_BUF_SIZE / 512) n = SCSI_DMA_BUF_SIZE / 512; - r->iov.iov_len = n * 512; - qemu_iovec_init_external(&r->qiov, &r->iov, 1); + r->iov->iov_len = n * 512; + qemu_iovec_init_external(&r->qiov, r->iov, 1); r->aiocb = bdrv_aio_readv(s->dinfo->bdrv, r->sector, &r->qiov, n, scsi_read_complete, r); - if (r->aiocb == NULL) - scsi_command_complete(r, STATUS_CHECK_CONDITION, SENSE_HARDWARE_ERROR); + if (r->aiocb == NULL) { + scsi_command_complete(r, STATUS_CHECK_CONDI...
2009 Oct 27
2
[PATCH 3/4] scsi-disk: Factor out SCSI command emulation
...if (n > SCSI_DMA_BUF_SIZE / 512) n = SCSI_DMA_BUF_SIZE / 512; - r->iov.iov_len = n * 512; - qemu_iovec_init_external(&r->qiov, &r->iov, 1); + r->iov->iov_len = n * 512; + qemu_iovec_init_external(&r->qiov, r->iov, 1); r->aiocb = bdrv_aio_readv(s->dinfo->bdrv, r->sector, &r->qiov, n, scsi_read_complete, r); - if (r->aiocb == NULL) - scsi_command_complete(r, STATUS_CHECK_CONDITION, SENSE_HARDWARE_ERROR); + if (r->aiocb == NULL) { + scsi_command_complete(r, STATUS_CHECK_CONDI...