From: Eric Blake <eblake@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Cc: stefanha@redhat.com, mreitz@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2] qcow2: Set zero flag for discarded clusters
Date: Mon, 17 Feb 2014 10:12:57 -0700 [thread overview]
Message-ID: <53024319.10203@redhat.com> (raw)
In-Reply-To: <1392648347-4981-1-git-send-email-kwolf@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 847 bytes --]
On 02/17/2014 07:45 AM, Kevin Wolf wrote:
> Instead of making the backing file contents visible again after a discard
> request, set the zero flag if possible (i.e. on version >= 3).
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> block/qcow2-cluster.c | 22 ++++++++++++++++++++--
> tests/qemu-iotests/046 | 18 ++++++++++++++----
> 2 files changed, 34 insertions(+), 6 deletions(-)
>
> + if (!!(old_offset & QCOW_OFLAG_ZERO)) {
The !! is not necessary here; any non-zero value in a boolean context
gives the same result as an explicit conversion to 0-or-1.
But as that's cosmetic, I'm okay whether you leave it as is or simplify
it, when adding:
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2014-02-17 17:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-17 14:45 [Qemu-devel] [PATCH v2] qcow2: Set zero flag for discarded clusters Kevin Wolf
2014-02-17 17:12 ` Eric Blake [this message]
2014-02-18 11:29 ` Kevin Wolf
-- strict thread matches above, loose matches on Subject: below --
2014-02-08 16:17 [Qemu-devel] [PATCH] " Max Reitz
2014-02-08 16:50 ` [Qemu-devel] [PATCH v2] " Kevin Wolf
2014-02-14 14:34 ` Stefan Hajnoczi
2014-02-14 17:05 ` Stefan Hajnoczi
2014-02-14 18:11 ` Kevin Wolf
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=53024319.10203@redhat.com \
--to=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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.