]> Git Repo - qemu.git/commitdiff
raw/linux-aio: Also initialize POSIX AIO
authorKevin Wolf <[email protected]>
Tue, 20 Oct 2009 09:33:12 +0000 (11:33 +0200)
committerAnthony Liguori <[email protected]>
Tue, 27 Oct 2009 17:28:35 +0000 (12:28 -0500)
When using Linux AIO raw still falls back to POSIX AIO sometimes, so we should
initialize it.

Not initializing it happens to work if POSIX AIO is used by another drive, or
if the format is not specified (probing the format uses POSIX AIO) or by pure
luck (e.g. it doesn't seem to happen any more with qcow2 since we have re-added
synchronous qcow2 functions).

Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
block/raw-posix.c

index 20b37a732c1b83f3a3993d463c1f92a2862951e8..5547fb526fa197315b4b267cbf2f0a5011d303e5 100644 (file)
@@ -173,6 +173,10 @@ static int raw_open_common(BlockDriverState *bs, const char *filename,
 #ifdef CONFIG_LINUX_AIO
     if ((bdrv_flags & (BDRV_O_NOCACHE|BDRV_O_NATIVE_AIO)) ==
                       (BDRV_O_NOCACHE|BDRV_O_NATIVE_AIO)) {
+
+        /* We're falling back to POSIX AIO in some cases */
+        paio_init();
+
         s->aio_ctx = laio_init();
         if (!s->aio_ctx) {
             goto out_free_buf;
This page took 0.027743 seconds and 4 git commands to generate.