Revision 3f4cb3d3 block-qcow.c
b/block-qcow.c | ||
---|---|---|
583 | 583 |
if (!acb->cluster_offset) { |
584 | 584 |
if (bs->backing_hd) { |
585 | 585 |
/* read from the base image */ |
586 |
acb->hd_iov.iov_base = acb->buf; |
|
586 |
acb->hd_iov.iov_base = (void *)acb->buf;
|
|
587 | 587 |
acb->hd_iov.iov_len = acb->n * 512; |
588 | 588 |
qemu_iovec_init_external(&acb->hd_qiov, &acb->hd_iov, 1); |
589 | 589 |
acb->hd_aiocb = bdrv_aio_readv(bs->backing_hd, acb->sector_num, |
... | ... | |
607 | 607 |
ret = -EIO; |
608 | 608 |
goto done; |
609 | 609 |
} |
610 |
acb->hd_iov.iov_base = acb->buf; |
|
610 |
acb->hd_iov.iov_base = (void *)acb->buf;
|
|
611 | 611 |
acb->hd_iov.iov_len = acb->n * 512; |
612 | 612 |
qemu_iovec_init_external(&acb->hd_qiov, &acb->hd_iov, 1); |
613 | 613 |
acb->hd_aiocb = bdrv_aio_readv(s->hd, |
... | ... | |
643 | 643 |
if (qiov->niov > 1) |
644 | 644 |
acb->buf = acb->orig_buf = qemu_memalign(512, qiov->size); |
645 | 645 |
else |
646 |
acb->buf = qiov->iov->iov_base; |
|
646 |
acb->buf = (uint8_t *)qiov->iov->iov_base;
|
|
647 | 647 |
acb->nb_sectors = nb_sectors; |
648 | 648 |
acb->n = 0; |
649 | 649 |
acb->cluster_offset = 0; |
... | ... | |
738 | 738 |
if (qiov->niov > 1) { |
739 | 739 |
acb->buf = acb->orig_buf = qemu_memalign(512, qiov->size); |
740 | 740 |
qemu_iovec_to_buffer(qiov, acb->buf); |
741 |
} else |
|
742 |
acb->buf = qiov->iov->iov_base; |
|
741 |
} else { |
|
742 |
acb->buf = (uint8_t *)qiov->iov->iov_base; |
|
743 |
} |
|
743 | 744 |
acb->nb_sectors = nb_sectors; |
744 | 745 |
acb->n = 0; |
745 | 746 |
|
Also available in: Unified diff