From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 2/3] raw-posix: Deprecate aio=threads fallback without O_DIRECT
Date: Thu, 19 Mar 2015 16:16:13 +0100 [thread overview]
Message-ID: <1426778174-1170-3-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1426778174-1170-1-git-send-email-kwolf@redhat.com>
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>
---
block/raw-posix.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index 844ac21..24d8582 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;
--
1.8.3.1
next prev parent reply other threads:[~2015-03-19 15:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-19 15:16 [Qemu-devel] [PULL 0/3] Block patches for 2.3.0-rc1 Kevin Wolf
2015-03-19 15:16 ` [Qemu-devel] [PULL 1/3] raw-posix: Deprecate host floppy passthrough Kevin Wolf
2015-03-19 15:16 ` Kevin Wolf [this message]
2015-03-19 15:16 ` [Qemu-devel] [PULL 3/3] block: Fix blockdev-backup not to use funky error class Kevin Wolf
2015-03-19 18:44 ` [Qemu-devel] [PULL 0/3] Block patches for 2.3.0-rc1 Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1426778174-1170-3-git-send-email-kwolf@redhat.com \
--to=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).