From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45515) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YInCM-0004to-2q for qemu-devel@nongnu.org; Tue, 03 Feb 2015 18:48:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YInCI-0002do-Te for qemu-devel@nongnu.org; Tue, 03 Feb 2015 18:48:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36268) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YInCI-0002db-MX for qemu-devel@nongnu.org; Tue, 03 Feb 2015 18:47:58 -0500 Message-ID: <54D15E26.1040603@redhat.com> Date: Tue, 03 Feb 2015 16:47:50 -0700 From: Eric Blake MIME-Version: 1.0 References: <1416844620-17717-1-git-send-email-mreitz@redhat.com> <1416844620-17717-5-git-send-email-mreitz@redhat.com> In-Reply-To: <1416844620-17717-5-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9jIahPJUQm1JOA0blQTOqD7vr4gXoKAIG" Subject: Re: [Qemu-devel] [PATCH v2 04/12] qcow2/overlaps: Protect image header List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , Peter Lieven , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --9jIahPJUQm1JOA0blQTOqD7vr4gXoKAIG Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/24/2014 08:56 AM, Max Reitz wrote: > Enter the image header into the metadata list to protect it against > accidental modifications. >=20 > Signed-off-by: Max Reitz > --- > block/qcow2.c | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Eric Blake >=20 > diff --git a/block/qcow2.c b/block/qcow2.c > index f80f9ed..19ac2df 100644 > --- a/block/qcow2.c > +++ b/block/qcow2.c > @@ -751,6 +751,8 @@ static int qcow2_open(BlockDriverState *bs, QDict *= options, int flags, > } > } > =20 > + qcow2_metadata_list_enter(bs, 0, 1, QCOW2_OL_MAIN_HEADER); > + > s->l2_bits =3D s->cluster_bits - 3; /* L2 is always one cluster */= > s->l2_size =3D 1 << s->l2_bits; > /* 2^(s->refcount_order - 3) is the refcount width in bytes */ >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --9jIahPJUQm1JOA0blQTOqD7vr4gXoKAIG 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/ iQEcBAEBCAAGBQJU0V4mAAoJEKeha0olJ0NqsVgH/jMZCS0bL/7ifkOD/hFjEyDI SVvEm2UC3EkNC6sUPlIHwaZkJNGomcE1tEvWKcH2dfr76YRgiuPWB5w+O76qedEg SxHuxr9J/qDKCZub+qziJTh2MACeW7OZL4mGkLVphY2yFHuq1uyj8Nb6YdyemB5S uZ6/BTIHobpnxyfvdsdl0jPEqrs2mjuErtTzxGwuqJwuKePz+prDLCW6hRVQLDos BoQHj2XXkDUkE9nPRzTeglNe/bAdiy/cv11F+0p83pyc30xbsNaTFBux1O4PZhgK fgbuFB/nwRfUZDbSPwkbEa7ogM1D04j4cJ1kVpr0BLcvHtm09EneD1QWaaSHz98= =McvY -----END PGP SIGNATURE----- --9jIahPJUQm1JOA0blQTOqD7vr4gXoKAIG--