aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2015-12-15 11:35:36 +0100
committerKevin Wolf <kwolf@redhat.com>2015-12-18 14:34:43 +0100
commitd657c0c289e944fc22289f5c318f48da87d79dcb (patch)
tree775382607e9e96429d12c6c0c2ca20250b95965e
parentb1fc8f934ba3fcdc8381b89413ad4df2e90d5312 (diff)
downloadqemu-d657c0c289e944fc22289f5c318f48da87d79dcb.zip
qemu-d657c0c289e944fc22289f5c318f48da87d79dcb.tar.gz
qemu-d657c0c289e944fc22289f5c318f48da87d79dcb.tar.bz2
raw-posix: Make aio=native option binding
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 <kwolf@redhat.com> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r--block/raw-posix.c20
1 files 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) */