Message ID | 20090828115030.19a2aa22@doriath |
---|---|
State | Superseded |
Headers | show |
On Fri, Aug 28, 2009 at 11:50:30AM -0300, Luiz Capitulino wrote: > > Current build is broken because laio_submit() is only available if > the host has Linux AIO support, otherwise we will get the following > build error: > > """ > block/raw-posix.o: In function `raw_aio_submit': > qemu-qmp/block/raw-posix.c:546: undefined reference to `laio_submit' > collect2: ld returned 1 exit status > """ looks good. Sorry, I had this working and changed it last minute.
diff --git a/block/raw-posix.c b/block/raw-posix.c index 8a7dc15..b5f03d6 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -542,10 +542,13 @@ static BlockDriverAIOCB *raw_aio_submit(BlockDriverState *bs, if (s->aligned_buf) { if (!qiov_is_aligned(qiov)) { type |= QEMU_AIO_MISALIGNED; - } else if (s->use_aio) { + } +#ifdef CONFIG_LINUX_AIO + else if (s->use_aio) { return laio_submit(bs, s->aio_ctx, s->fd, sector_num, qiov, nb_sectors, cb, opaque, type); } +#endif } return paio_submit(bs, s->aio_ctx, s->fd, sector_num, qiov, nb_sectors,
Current build is broken because laio_submit() is only available if the host has Linux AIO support, otherwise we will get the following build error: """ block/raw-posix.o: In function `raw_aio_submit': qemu-qmp/block/raw-posix.c:546: undefined reference to `laio_submit' collect2: ld returned 1 exit status """ Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> --- PS: Hope this is right, only compiled tested.