From: Kevin Wolf <kwolf@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: "prerna@linux.vnet.ibm.com Anthony Liguori" <aliguori@us.ibm.com>,
Christoph Hellwig <hch@lst.de>,
qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 1/4] block: clarify the meaning of BDRV_O_NOCACHE
Date: Wed, 16 Mar 2011 10:55:04 +0100 [thread overview]
Message-ID: <4D8088F8.1020708@redhat.com> (raw)
In-Reply-To: <AANLkTikGa2o-qso-kGWUkh4qN8gtkr6K=p_k1zJe3s48@mail.gmail.com>
Am 16.03.2011 10:42, schrieb Stefan Hajnoczi:
> On Tue, Mar 15, 2011 at 2:11 PM, Christoph Hellwig <hch@lst.de> wrote:
>> Change BDRV_O_NOCACHE to only imply bypassing the host OS file cache,
>> but no writeback semantics. All existing callers are changed to also
>> specify BDRV_O_CACHE_WB to give them writeback semantics.
>>
>> Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> I think there is one hunk missing:
> diff --git a/block/qcow2.c b/block/qcow2.c
> index 75b8bec..db1931b 100644
> --- a/block/qcow2.c
> +++ b/block/qcow2.c
> @@ -229,7 +229,7 @@ static int qcow2_open(BlockDriverState *bs, int flags)
> }
>
> /* alloc L2 table/refcount block cache */
> - writethrough = ((flags & BDRV_O_CACHE_MASK) == 0);
> + writethrough = ((flags & (BDRV_O_CACHE_WB | BDRV_O_NO_FLUSH)) == 0);
> s->l2_table_cache = qcow2_cache_create(bs, L2_CACHE_SIZE, writethrough);
> s->refcount_block_cache = qcow2_cache_create(bs, REFCOUNT_CACHE_SIZE,
> writethrough);
This one doesn't make a difference. But the intention could be made
clearer now that all writeback modes have BDRV_O_CACHE_WB set:
writethrough = ((flags & BDRV_O_CACHE_WB) == 0);
Kevin
next prev parent reply other threads:[~2011-03-16 9:53 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-15 14:10 [Qemu-devel] [PATCH, RFC 0/4] allow guest control of the volatile write cache Christoph Hellwig
2011-03-15 14:11 ` [Qemu-devel] [PATCH 1/4] block: clarify the meaning of BDRV_O_NOCACHE Christoph Hellwig
2011-03-16 9:42 ` [Qemu-devel] " Stefan Hajnoczi
2011-03-16 9:55 ` Kevin Wolf [this message]
2011-03-16 14:08 ` Christoph Hellwig
2011-03-16 17:00 ` Stefan Hajnoczi
2011-03-17 9:07 ` Kevin Wolf
2011-03-17 9:18 ` Stefan Hajnoczi
2011-03-15 14:11 ` [Qemu-devel] [PATCH 2/4] block: add a helper to change writeback mode on the fly Christoph Hellwig
2011-03-15 14:11 ` [Qemu-devel] [PATCH 3/4] ide: wire up setfeatures cache control Christoph Hellwig
2011-03-15 14:11 ` [Qemu-devel] [PATCH 4/4] virtio-blk: add runtime " Christoph Hellwig
2011-03-16 9:49 ` [Qemu-devel] Re: [PATCH 2/4] block: add a helper to change writeback mode on the fly Stefan Hajnoczi
2011-03-16 9:59 ` Kevin Wolf
2011-03-17 14:44 ` [Qemu-devel] " Daniel P. Berrange
2011-03-17 15:11 ` Kevin Wolf
2011-03-17 16:44 ` Stefan Hajnoczi
2011-03-19 8:28 ` Blue Swirl
2011-03-15 14:16 ` [Qemu-devel] [PATCH, RFC] virtio_blk: add cache control support Christoph Hellwig
2011-03-16 4:09 ` [Qemu-devel] " Rusty Russell
2011-03-16 14:09 ` Christoph Hellwig
2011-03-17 5:06 ` Rusty Russell
2011-03-17 14:21 ` Christoph Hellwig
2011-03-24 0:11 ` Rusty Russell
2011-03-24 3:11 ` Anthony Liguori
2011-03-24 3:05 ` Anthony Liguori
2011-03-24 9:54 ` Christian Borntraeger
2011-03-25 5:08 ` Rusty Russell
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=4D8088F8.1020708@redhat.com \
--to=kwolf@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=hch@lst.de \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.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 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).