diff options
author | Kevin Wolf <kwolf@redhat.com> | 2009-10-20 11:33:12 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-10-27 12:28:35 -0500 |
commit | d2e4634504768d287f5d68ae45ca5995177aea1c (patch) | |
tree | 09849fcd7dbf7c986a09239c82dc344861e97490 /block | |
parent | c5baaa489f5557fa01431ba0c5de28b43fc9631e (diff) |
raw/linux-aio: Also initialize POSIX AIO
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 <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/raw-posix.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/block/raw-posix.c b/block/raw-posix.c index 20b37a732c..5547fb526f 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -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; |