From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38613) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xh4Ha-0006p1-Hf for qemu-devel@nongnu.org; Wed, 22 Oct 2014 18:21:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xh4HT-0008Tt-Vo for qemu-devel@nongnu.org; Wed, 22 Oct 2014 18:21:30 -0400 Received: from resqmta-ch2-08v.sys.comcast.net ([69.252.207.40]:57863) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xh4HT-0008TX-Pg for qemu-devel@nongnu.org; Wed, 22 Oct 2014 18:21:23 -0400 Message-ID: <54482D38.5080904@redhat.com> Date: Wed, 22 Oct 2014 16:18:32 -0600 From: Eric Blake MIME-Version: 1.0 References: <201410211604116199416@sangfor.com> <5446265E.306@redhat.com> In-Reply-To: <5446265E.306@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="6GhlrpN7TNjquXbIopre8KpGdgLLkoA3t" Subject: Re: [Qemu-devel] [PATCH] snapshot: use local variable to bdrv_pwrite_sync L1 table List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , Zhang Haoyu , qemu-devel Cc: Kevin Wolf , qemu-trivial , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --6GhlrpN7TNjquXbIopre8KpGdgLLkoA3t Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/21/2014 03:24 AM, Max Reitz wrote: > On 2014-10-21 at 10:04, Zhang Haoyu wrote: >> Use local variable to bdrv_pwrite_sync L1 table, >> needless to make conversion of cached L1 table between >> big-endian and host style. >> >> Signed-off-by: Zhang Haoyu >> --- >> block/qcow2-refcount.c | 22 +++++++--------------- >> 1 file changed, 7 insertions(+), 15 deletions(-) >> I know we're up to v5 and that Max already took it into his branch, but..= =2E >> l1_size2 =3D l1_size * sizeof(uint64_t); >> + l1_table =3D g_try_malloc0(align_offset(l1_size2, 512)); >=20 > I wanted to propose using qemu_try_blockalign(), but since it'd require= > a memset() afterwards, it gets rather ugly. Not after this recent patch: https://lists.gnu.org/archive/html/qemu-devel/2014-10/msg02499.html --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --6GhlrpN7TNjquXbIopre8KpGdgLLkoA3t 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 iQEcBAEBCAAGBQJUSC04AAoJEKeha0olJ0Nqwn0H/jgoRjBy91tvxYaQotIlrdKg pkjSs0ERTtsoKtKn3nCwcXxchBB9bDK8IBBrXcF5RO6sf1WKsQPmuP//WAVUW0jP LufnXqvJYyk7aypndVyXz+xAaCZPX0BCiB3iXYQxThsahzWcmnLl6yqlg2ocnhiT 44AKZOfPnsU74pYMSmNhiSXSAn6JhQgBjj+Rqei2gpxBVEIxwDRo00g1y8A4j3vO A6N8gjkcuVd2LlDxyYyhrJ4bys9rJWr0RDH3Cu3A3rXEdqY7gmq6SIBpOY3/XbxU C7fV0pf5ZNp9gbCCJxkrmkarNkjdbf8ExCg7UKL2joaGXKbLjCPS0IQpk74cFMo= =okS1 -----END PGP SIGNATURE----- --6GhlrpN7TNjquXbIopre8KpGdgLLkoA3t--