* [Qemu-devel] [PATCH] block: Fix build
@ 2009-08-28 14:50 Luiz Capitulino
2009-08-28 14:58 ` [Qemu-devel] " Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Luiz Capitulino @ 2009-08-28 14:50 UTC (permalink / raw)
To: qemu-devel; +Cc: hch
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.
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,
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Qemu-devel] Re: [PATCH] block: Fix build
2009-08-28 14:50 [Qemu-devel] [PATCH] block: Fix build Luiz Capitulino
@ 2009-08-28 14:58 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2009-08-28 14:58 UTC (permalink / raw)
To: Luiz Capitulino; +Cc: qemu-devel, hch
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-08-28 14:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-28 14:50 [Qemu-devel] [PATCH] block: Fix build Luiz Capitulino
2009-08-28 14:58 ` [Qemu-devel] " Christoph Hellwig
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).