qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, stefanha@redhat.com, mreitz@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2] qcow2: Set zero flag for discarded clusters
Date: Tue, 18 Feb 2014 12:29:52 +0100	[thread overview]
Message-ID: <20140218112952.GF3253@dhcp-200-207.str.redhat.com> (raw)
In-Reply-To: <53024319.10203@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 743 bytes --]

Am 17.02.2014 um 18:12 hat Eric Blake geschrieben:
> 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.

Thanks, that looks a bit odd indeed. I'll change it.

Kevin

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-02-18 11:30 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
2014-02-18 11:29   ` Kevin Wolf [this message]
  -- 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=20140218112952.GF3253@dhcp-200-207.str.redhat.com \
    --to=kwolf@redhat.com \
    --cc=eblake@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 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).