qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, famz@redhat.com, armbru@redhat.com,
	qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH for-2.3] raw-posix: Deprecate aio=threads fallback without O_DIRECT
Date: Tue, 17 Mar 2015 13:48:57 +0100	[thread overview]
Message-ID: <1426596537-22616-1-git-send-email-kwolf@redhat.com> (raw)

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>
---
 block/raw-posix.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/block/raw-posix.c b/block/raw-posix.c
index f0b4488..929b6ae 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)) {
+        fprintf(stderr, "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

             reply	other threads:[~2015-03-17 12:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-17 12:48 Kevin Wolf [this message]
2015-03-17 14:18 ` [Qemu-devel] [PATCH for-2.3] raw-posix: Deprecate aio=threads fallback without O_DIRECT Markus Armbruster
2015-03-17 14:22 ` [Qemu-devel] [Qemu-block] " Eric Blake

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=1426596537-22616-1-git-send-email-kwolf@redhat.com \
    --to=kwolf@redhat.com \
    --cc=armbru@redhat.com \
    --cc=famz@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).