[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 25/29] raw-posix: warn about BDRV_O_NATIVE_AIO if lib
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 25/29] raw-posix: warn about BDRV_O_NATIVE_AIO if libaio is unavailable |
Date: |
Fri, 16 Oct 2015 17:06:10 +0200 |
From: Stefan Hajnoczi <address@hidden>
raw-posix.c silently ignores BDRV_O_NATIVE_AIO if libaio is unavailable.
It is confusing when aio=native performance is identical to aio=threads
because the binary was accidentally built without libaio.
Print a deprecation warning if -drive aio=native is used with a binary
that does not support libaio. There are probably users using aio=native
who would be inconvenienced if QEMU suddenly refused to start their
guests. In the future this will become an error.
Signed-off-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/raw-posix.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index cc1b874..3a527f0 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -519,7 +519,16 @@ static int raw_open_common(BlockDriverState *bs, QDict
*options,
"future QEMU versions.\n",
bs->filename);
}
-#endif
+#else
+ if (bdrv_flags & BDRV_O_NATIVE_AIO) {
+ error_printf("WARNING: aio=native was specified for '%s', but "
+ "is not supported in this build. Falling back to "
+ "aio=threads.\n"
+ " This will become an error condition in "
+ "future QEMU versions.\n",
+ bs->filename);
+ }
+#endif /* !defined(CONFIG_LINUX_AIO) */
s->has_discard = true;
s->has_write_zeroes = true;
--
1.8.3.1
- [Qemu-block] [PULL 15/29] block-backend: Add blk_set_bs(), (continued)
- [Qemu-block] [PULL 15/29] block-backend: Add blk_set_bs(), Kevin Wolf, 2015/10/16
- [Qemu-block] [PULL 16/29] block: Introduce parents list, Kevin Wolf, 2015/10/16
- [Qemu-block] [PULL 18/29] blockjob: Store device name at job creation, Kevin Wolf, 2015/10/16
- [Qemu-block] [PULL 17/29] block: Implement bdrv_append() without bdrv_swap(), Kevin Wolf, 2015/10/16
- [Qemu-block] [PULL 21/29] block: Allow bdrv_unref_child(bs, NULL), Kevin Wolf, 2015/10/16
- [Qemu-block] [PULL 09/29] block: Convert bs->file to BdrvChild, Kevin Wolf, 2015/10/16
- [Qemu-block] [PULL 20/29] block: Remove bdrv_swap(), Kevin Wolf, 2015/10/16
- [Qemu-block] [PULL 19/29] block: Add and use bdrv_replace_in_backing_chain(), Kevin Wolf, 2015/10/16
- [Qemu-block] [PULL 22/29] blkverify: Fix BDS leak in .bdrv_open error path, Kevin Wolf, 2015/10/16
- [Qemu-block] [PULL 23/29] util - add automated ID generation utility, Kevin Wolf, 2015/10/16
- [Qemu-block] [PULL 25/29] raw-posix: warn about BDRV_O_NATIVE_AIO if libaio is unavailable,
Kevin Wolf <=
- [Qemu-block] [PULL 24/29] block: auto-generated node-names, Kevin Wolf, 2015/10/16
- [Qemu-block] [PULL 26/29] blockdev: always compile in -drive aio= parsing, Kevin Wolf, 2015/10/16
- [Qemu-block] [PULL 27/29] qemu-nbd: always compile in --aio=MODE option, Kevin Wolf, 2015/10/16
- [Qemu-block] [PULL 28/29] qcow2: Remove forward declaration of QCowAIOCB, Kevin Wolf, 2015/10/16
- [Qemu-block] [PULL 29/29] blkdebug: Don't confuse image as backing file, Kevin Wolf, 2015/10/16
- Re: [Qemu-block] [Qemu-devel] [PULL 00/29] Block layer patches, Peter Maydell, 2015/10/18