Received: from eggs.gnu.org ([2001:4830:134:3::10]:33000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xz1ti-00026H-Ir for qemu-devel@nongnu.org; Thu, 11 Dec 2014 06:27:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xz1tZ-0003Ss-I8 for qemu-devel@nongnu.org; Thu, 11 Dec 2014 06:27:06 -0500 Received: from mail-wi0-x22d.google.com ([2a00:1450:400c:c05::22d]:45423) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xz1tZ-0003SZ-Cd for qemu-devel@nongnu.org; Thu, 11 Dec 2014 06:26:57 -0500 Received: by mail-wi0-f173.google.com with SMTP id r20so14222552wiv.6 for ; Thu, 11 Dec 2014 03:26:56 -0800 (PST) Date: Thu, 11 Dec 2014 11:26:54 +0000 From: Stefan Hajnoczi Message-ID: <20141211112654.GI30812@stefanha-thinkpad.redhat.com> References: <1417613866-25890-1-git-send-email-mreitz@redhat.com> <1417613866-25890-10-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="OfrWf2Fun5Ae4m0Y" Content-Disposition: inline In-Reply-To: <1417613866-25890-10-git-send-email-mreitz@redhat.com> Subject: Re: [Qemu-devel] [PATCH v4 09/26] qcow2: Helper for refcount array reallocation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi --OfrWf2Fun5Ae4m0Y Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 03, 2014 at 02:37:29PM +0100, Max Reitz wrote: > Add a helper function for reallocating a refcount array, independent of > the refcount order. The newly allocated space is zeroed and the function > handles failed reallocations gracefully. >=20 > The helper function will always align the buffer size to a cluster > boundary; if storing the refcounts in such an array in big endian byte > order, this makes it possible to write parts of the array directly as > refcount blocks into the image file. >=20 > Signed-off-by: Max Reitz > --- > block/qcow2-refcount.c | 137 +++++++++++++++++++++++++++++++------------= ------ > 1 file changed, 88 insertions(+), 49 deletions(-) Reviewed-by: Stefan Hajnoczi --OfrWf2Fun5Ae4m0Y Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUiX9+AAoJEJykq7OBq3PIqQwIAJ/kKGmX7zgLAQttnvW5Zsvr mBsYGSPGtWeYSipl97D0zZ3HVzwmNij7B+q8x2ckkot5EmSxrmITrD7GqlHC8kxU dw52NFFAREsIPQ5UW/MIXTKyepfllkDJu8X5HXHXDK78mN+GJmMPW9y0LVZ7eSuu Kiaw2JglNd+k2hdPZLb/z4LiEOGuyTGZlIpg2BeMFMzy189ScIfxVI/xJgGFCXlS l0gi50BY6piEGd/qkyO5Yms7hqAfqyeN01RUXB/7aKZWMWZTVW/2uDJZ++xfotVO Llh+eBL2G54CxU0cHh44AcE77Fzawsz3Sv5dHHPuj1ltoKPLC3LSTIkcpaMhhJ8= =DlW6 -----END PGP SIGNATURE----- --OfrWf2Fun5Ae4m0Y--