qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-commits] [COMMIT 5c6c3a6] raw-posix: add Linux native AIO supp


From: malc
Subject: Re: [Qemu-commits] [COMMIT 5c6c3a6] raw-posix: add Linux native AIO support
Date: Fri, 28 Aug 2009 14:38:57 +0400 (MSD)

On Fri, 28 Aug 2009, Stefan Weil wrote:

> Anthony Liguori schrieb:
> > From: Christoph Hellwig <address@hidden>

[..snip..]

> 
> Hello
> 
> Linking qemu-nbd fails with latest QEMU (maybe caused by this commit):
> 
> LINK  qemu-nbd
> block/raw-posix.o: In function `raw_aio_submit':
> /home/stefan/src/qemu/savannah/qemu/block/raw-posix.c:546: undefined
> reference to `laio_submit'
> collect2: ld returned 1 exit status
> make: *** [qemu-nbd] Fehler 1

Same here, the whole thing was apparently never properly tested,
following works for me:

diff --git a/block/raw-posix.c b/block/raw-posix.c
index 8a7dc15..67ec28e 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -542,9 +542,14 @@ 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) {
+        }
+        else if (s->use_aio) {
+#ifdef CONFIG_LINUX_AIO
             return laio_submit(bs, s->aio_ctx, s->fd, sector_num, qiov,
-                              nb_sectors, cb, opaque, type);
+                               nb_sectors, cb, opaque, type);
+#else
+            abort();
+#endif
         }
     }
 
P.S. The above was tab damaged too.

-- 
mailto:address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]