qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] qcow2: Set zero flag for discarded clusters


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH v2] qcow2: Set zero flag for discarded clusters
Date: Tue, 18 Feb 2014 12:29:52 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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 <address@hidden>
> > ---
> >  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: pgpukHbOdGAFR.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]