From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58054) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkvDu-00005a-O0 for qemu-devel@nongnu.org; Thu, 15 May 2014 08:57:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkvDn-0006Iy-FI for qemu-devel@nongnu.org; Thu, 15 May 2014 08:57:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61874) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkvDn-0006It-78 for qemu-devel@nongnu.org; Thu, 15 May 2014 08:57:15 -0400 Message-ID: <5374B9A7.9040106@redhat.com> Date: Thu, 15 May 2014 06:57:11 -0600 From: Eric Blake MIME-Version: 1.0 References: <50765faa0041d43d22dd14a0128d3b55850571ac.1400123059.git.jcody@redhat.com> <20140515122657.GH2812@irqsave.net> In-Reply-To: <20140515122657.GH2812@irqsave.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="7iMuULrWcK4S5pi5qvtw4dTDaUTVOskxP" Subject: Re: [Qemu-devel] [PATCH 5/5] block: extend block-commit to accept a string for the backing file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QmVub8OudCBDYW5ldA==?= , Jeff Cody Cc: kwolf@redhat.com, pkrempa@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --7iMuULrWcK4S5pi5qvtw4dTDaUTVOskxP Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 05/15/2014 06:26 AM, Beno=C3=AEt Canet wrote: > The Wednesday 14 May 2014 =C3=A0 23:20:19 (-0400), Jeff Cody wrote : >> On some image chains, QEMU may not always be able to resolve the >> filenames properly, when updating the backing file of an image >> after a block commit. >> >> } else { >> commit_start(bs, base_bs, top_bs, speed, on_error, block_job_= cb, bs, >> - &local_err); >> + backing_file, &local_err); >=20 > I don't know QAPI well enough to be sure but are we certain that if=20 > has_backing_file =3D=3D false then backing_file =3D=3D NULL and not som= e > random pointer ? >=20 > If am thinking to add has_backing_file ? backing_file : NULL here. We are moving towards having qapi guarantee sane defaults for FOO when has_FOO is false; but aren't there yet. You are correct that this needs to guarantee that we aren't passing random memory. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --7iMuULrWcK4S5pi5qvtw4dTDaUTVOskxP 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/ iQEcBAEBCAAGBQJTdLmnAAoJEKeha0olJ0NqeMEH/iIZENXuv8Rht1LElE9Rn2+l 4TYku22PAR6Gh+CF0k8az24eSyMBaVtXrYLddgk/KOS4yWTFkQgWSYPxonQ7XQGl 4hpI29e0aU03fFMKF0y1EtWTqQgzIBIKdVGi3Lje578oFb4jgciXLwm55zgyUgNK 757gW9mUIOQhg6Ljzh2mrVKlHMzaCd1lfPIHHQQ3KdbsYLgxtVjociKt69ThcATO dCYQwK8CuFc6OaQKKl1l5C2/sjM/Rj6TEs8d09D5pAb3aEIs/cR+jmaRNFLFRBq8 x4L3vGKgwJOkKoNb0LeAYCSfXgTrscZ/60xFUpaJFckRvob6ZLLr4/JHB4LXJCA= =a7MZ -----END PGP SIGNATURE----- --7iMuULrWcK4S5pi5qvtw4dTDaUTVOskxP--