From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: xen-devel@lists.xensource.com,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] xen_disk: support cache backend option
Date: Wed, 26 Jun 2013 22:53:32 +0200 [thread overview]
Message-ID: <51CB54CC.30409@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1306261846300.4782@kaball.uk.xensource.com>
Il 26/06/2013 19:48, Stefano Stabellini ha scritto:
> + if (!strcmp(blkdev->cache, "none")) {
> + qflags = BDRV_O_NATIVE_AIO | BDRV_O_NOCACHE;
> + } else if (!strcmp(blkdev->cache, "writethrough")) {
> + qflags = 0;
> + } else {
> + /* default to writeback */
> + qflags = BDRV_O_NATIVE_AIO | BDRV_O_CACHE_WB;
> + }
You can use bdrv_parse_cache_flags. Note that BDRV_O_NATIVE_AIO
requires BDRV_O_NOCACHE too (but if you only specify BDRV_O_NATIVE_AIO
it's a no-op, not an error).
Paolo
WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: xen-devel@lists.xensource.com,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
qemu-devel@nongnu.org
Subject: Re: [PATCH] xen_disk: support cache backend option
Date: Wed, 26 Jun 2013 22:53:32 +0200 [thread overview]
Message-ID: <51CB54CC.30409@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1306261846300.4782@kaball.uk.xensource.com>
Il 26/06/2013 19:48, Stefano Stabellini ha scritto:
> + if (!strcmp(blkdev->cache, "none")) {
> + qflags = BDRV_O_NATIVE_AIO | BDRV_O_NOCACHE;
> + } else if (!strcmp(blkdev->cache, "writethrough")) {
> + qflags = 0;
> + } else {
> + /* default to writeback */
> + qflags = BDRV_O_NATIVE_AIO | BDRV_O_CACHE_WB;
> + }
You can use bdrv_parse_cache_flags. Note that BDRV_O_NATIVE_AIO
requires BDRV_O_NOCACHE too (but if you only specify BDRV_O_NATIVE_AIO
it's a no-op, not an error).
Paolo
next prev parent reply other threads:[~2013-06-26 20:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-26 17:48 [Qemu-devel] [PATCH] xen_disk: support cache backend option Stefano Stabellini
2013-06-26 17:48 ` Stefano Stabellini
2013-06-26 20:53 ` Paolo Bonzini [this message]
2013-06-26 20:53 ` Paolo Bonzini
2013-06-26 21:42 ` [Qemu-devel] " Stefano Stabellini
2013-06-26 21:42 ` Stefano Stabellini
2013-06-26 20:58 ` [Qemu-devel] " Anthony Liguori
2013-06-26 20:58 ` Anthony Liguori
2013-06-26 21:48 ` [Qemu-devel] " Stefano Stabellini
2013-06-26 21:48 ` Stefano Stabellini
2013-06-26 22:10 ` [Qemu-devel] " Anthony Liguori
2013-06-26 22:10 ` Anthony Liguori
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=51CB54CC.30409@redhat.com \
--to=pbonzini@redhat.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=qemu-devel@nongnu.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.