From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57617) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFisD-0006cq-Ra for qemu-devel@nongnu.org; Tue, 18 Feb 2014 06:30:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WFis7-0000PK-Pi for qemu-devel@nongnu.org; Tue, 18 Feb 2014 06:30:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:64802) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WFis7-0000P7-HQ for qemu-devel@nongnu.org; Tue, 18 Feb 2014 06:29:55 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s1IBTsXH003840 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 18 Feb 2014 06:29:54 -0500 Date: Tue, 18 Feb 2014 12:29:52 +0100 From: Kevin Wolf Message-ID: <20140218112952.GF3253@dhcp-200-207.str.redhat.com> References: <1392648347-4981-1-git-send-email-kwolf@redhat.com> <53024319.10203@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Q68bSM7Ycu6FN28Q" Content-Disposition: inline In-Reply-To: <53024319.10203@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2] qcow2: Set zero flag for discarded clusters List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, stefanha@redhat.com, mreitz@redhat.com --Q68bSM7Ycu6FN28Q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 disca= rd > > request, set the zero flag if possible (i.e. on version >=3D 3). > >=20 > > Signed-off-by: Kevin Wolf > > --- > > block/qcow2-cluster.c | 22 ++++++++++++++++++++-- > > tests/qemu-iotests/046 | 18 ++++++++++++++---- > > 2 files changed, 34 insertions(+), 6 deletions(-) > >=20 >=20 > > + if (!!(old_offset & QCOW_OFLAG_ZERO)) { >=20 > 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 --Q68bSM7Ycu6FN28Q Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJTA0QwAAoJEH8JsnLIjy/WvUkP/3eCfAKxKFr2KH2PGYjcEFn1 HEl5LRlLCMiRvZVN7Srhtw2tulOUurfDRHWgO3vDtyHiw68UgzjLgrjfL9IZLunb P9/Z8y4u6dc+Z7PBur4qW4cD82wwfXziRFMwEfS2iQGShH1XmPvF+CHr7sWUUP7+ xMYkvkIqI2r3SMk4DMM5WnJl1HfhXQu2nPZ5dOlMq0rzSNGcN1L4qDC/UlLXjrz9 000R7mXyp+mkf2qVlTXzv0cxB509aAmGm6/SUTlDJpYvvO0qyXkQALzaDW1r8i5/ nHjBSmnwiQGrt+X+7B7ZbHeYgxiGtOjNJE0E3FvFNTCray2pW2LoS0HaNDbluUdt LjEyna1jvzAXVEXEiurvTptX6dtRMY+rfB0RgUlQ8z99xk6rkbWy+xC1bUk9DWoz KWP/W7GpulSj+T2RZ+fnOSXEPaK1/ENTuNgY5LfSbwT1Nl515DFddN77EBngUZQQ T5wYJZZeaFuTWNmPIOOpB3AdAeGqEWka9ZgjwFf3X6x/2OlfooGNR/soOfd+fJwH RcObSsxSOr+ipGW9SCy12W1poYgOOGjz5Xt3oh3m3Djb9tbjhZtaEGCNe9WyjyR5 b/t+BQil+aLIW1SbCGEhBwWysUFemduz+qE0b2YdwrgfNaALpOmiyDJp/ODjDy7+ aq1FLbyP7L9TKNlOdXp1 =BzuY -----END PGP SIGNATURE----- --Q68bSM7Ycu6FN28Q--