diff options
author | Kevin Wolf <kwolf@redhat.com> | 2015-03-17 13:45:21 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2015-03-19 12:30:56 +0100 |
commit | 965182549cee6fa337f0e72cde4d5787f35f33ac (patch) | |
tree | acb087cfe0caf76ccf06d6cd391b18afe653d572 /block | |
parent | 92a539d22e0da14d5395eb2c2c8bee162ebdb0b8 (diff) |
raw-posix: Deprecate aio=threads fallback without O_DIRECT
Currently, if the user requests aio=native, but forgets to choose a
cache mode that sets O_DIRECT, that request is silently ignored and raw
falls back to aio=threads.
Deprecate that behaviour so we can make it an error in future qemu
versions.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/raw-posix.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/block/raw-posix.c b/block/raw-posix.c index 844ac21082..24d85826c4 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -503,6 +503,14 @@ static int raw_open_common(BlockDriverState *bs, QDict *options, error_setg_errno(errp, -ret, "Could not set AIO state"); 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); + } #endif s->has_discard = true; |