From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34841) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLaME-0007kv-UL for qemu-devel@nongnu.org; Wed, 11 Feb 2015 11:41:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLaMB-0000WN-H0 for qemu-devel@nongnu.org; Wed, 11 Feb 2015 11:41:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46170) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLaMB-0000WJ-81 for qemu-devel@nongnu.org; Wed, 11 Feb 2015 11:41:43 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1BGfftb011401 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 11 Feb 2015 11:41:42 -0500 Message-ID: <54DB8644.4010305@redhat.com> Date: Wed, 11 Feb 2015 09:41:40 -0700 From: Eric Blake MIME-Version: 1.0 References: <1423600146-7642-1-git-send-email-mreitz@redhat.com> <1423600146-7642-6-git-send-email-mreitz@redhat.com> In-Reply-To: <1423600146-7642-6-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="0pHlmMfn9qfl6TBojtMpbGIFg28PujIum" Subject: Re: [Qemu-devel] [PATCH v6 05/24] qcow2: Use unsigned addend for update_refcount() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --0pHlmMfn9qfl6TBojtMpbGIFg28PujIum Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/10/2015 01:28 PM, Max Reitz wrote: > update_refcount() and qcow2_update_cluster_refcount() currently take a > signed addend. At least one caller passes a value directly derived from= > an absolute refcount that should be reached ("l2_refcount - 1" in > expand_zero_clusters_in_l1()). Therefore, the addend should be unsigned= > as well; this will be especially important for 64 bit refcounts. >=20 > Because update_refcount() then no longer knows whether the refcount > should be increased or decreased, it now requires an additional flag > which specified exactly that. The same applies to > qcow2_update_cluster_refcount(). >=20 > Signed-off-by: Max Reitz > --- > block/qcow2-cluster.c | 3 ++- > block/qcow2-refcount.c | 65 +++++++++++++++++++++++++++++++++---------= -------- > block/qcow2.h | 8 ++++++- > 3 files changed, 52 insertions(+), 24 deletions(-) >=20 Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --0pHlmMfn9qfl6TBojtMpbGIFg28PujIum Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJU24ZEAAoJEKeha0olJ0NqPqQH/Rd8d7o3I7qtFR7rKMDxpjUo ZyTEETYSigwzJqBzj3ehcm/UKKnkDFGWGuQv4/qd7mVR3MIcr6lRQ/YPkmFsRcaU H1lxaIYjhB3Bz1htGnsr1s5JssWVTh04vxdeDoNUzLcqE4LhUSy30A8iHjGGxnb5 YQoWUM1mIm7i23gLkZc8dsXnbgiNFwOb6qlXnDOsdaUnhUzSF75iWCB6AuTKAjWm iPa1EPatjqf6kSiQ3EgACgWmq9d+NLk5tQsygGFSqXW+Uchzy0ZZ4X6iD9zpykpR AfWNMr/MGeDmQx24uqXWo4R0emXNxZKNYTKMXdJqnj0BMjUvYsSRrLUvyMbwzw8= =D/mR -----END PGP SIGNATURE----- --0pHlmMfn9qfl6TBojtMpbGIFg28PujIum--