[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 36/48] raw-posix: Make aio=native option binding
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 36/48] raw-posix: Make aio=native option binding |
Date: |
Fri, 18 Dec 2015 16:07:42 +0100 |
Traditionally, aio=native was treated as an advice that could simply be
ignored if an error occurs while initialising Linux AIO or the feature
wasn't compiled in. This behaviour was deprecated in commit 96518254
(qemu 2.3; error during init) and commit 1501ecc1 (qemu 2.5; not
compiled in).
This patch changes raw-posix to error out in these cases instead of
printing a deprecation warning.
Signed-off-by: Kevin Wolf <address@hidden>
Acked-by: Christian Borntraeger <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
---
block/raw-posix.c | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index ffeebe1..076d070 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -500,21 +500,17 @@ static int raw_open_common(BlockDriverState *bs, QDict
*options,
goto fail;
}
if (!s->use_aio && (bdrv_flags & BDRV_O_NATIVE_AIO)) {
- error_printf("WARNING: aio=native was specified for '%s', but "
- "it requires cache.direct=on, which was not "
- "specified. Falling back to aio=threads.\n"
- " This will become an error condition in "
- "future QEMU versions.\n",
- bs->filename);
+ error_setg(errp, "aio=native was specified, but it requires "
+ "cache.direct=on, which was not specified.");
+ ret = -EINVAL;
+ goto fail;
}
#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);
+ error_setg(errp, "aio=native was specified, but is not supported "
+ "in this build.");
+ ret = -EINVAL;
+ goto fail;
}
#endif /* !defined(CONFIG_LINUX_AIO) */
--
1.8.3.1
- [Qemu-devel] [PULL 01/48] iotests: 124: Split into two test classes, (continued)
- [Qemu-devel] [PULL 01/48] iotests: 124: Split into two test classes, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 47/48] qemu-img: abort when full_backing_filename not present, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 28/48] qcow2: Use abort() instead of assert(false), Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 21/48] blkdebug: Enable reopen, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 05/48] block: Fix reopen with semantically overlapping options, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 43/48] qemu-iotests: s390x: fix test 068, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 06/48] mirror: Error out when a BDS would get two BBs, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 34/48] iotests: Extend test 112 for qemu-img amend, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 07/48] block: Allow references for backing files, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 27/48] qcow2: Use error_report() in qcow2_amend_options(), Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 36/48] raw-posix: Make aio=native option binding,
Kevin Wolf <=
- [Qemu-devel] [PULL 13/48] block: reopen: Document option precedence and refactor accordingly, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 18/48] qemu-iotests: Remove cache mode test without medium, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 25/48] progress: Allow regressing progress, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 08/48] block: Consider all block layer options in append_open_options, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 22/48] qemu-iotests: Try setting cache mode for children, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 04/48] qcow2: Add .bdrv_join_options callback, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 12/48] block: Allow specifying child options in reopen, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 26/48] block: Add opaque value to the amend CB, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 48/48] block/qapi: allow best-effort query, Kevin Wolf, 2015/12/18
- [Qemu-devel] [PULL 35/48] qcow2: insert assert into qcow2_get_specific_info(), Kevin Wolf, 2015/12/18